Reverse an Array in Perl

Reverse an Array using Perl Program


Here the below Prel script will convert the given array in reverse order. When I pass the array object as argument to reverse method the that function will return an array in reverse order.
//Perl Source code.

#!/usr/bin/perl
print "Content-type:text/html\n\n";
@gy=("Mango", "Orange", "Banana");
@gy=reverse(@gy);
print @gy;
exit;


Related Topic What is Scalar Values Manipulation in Perl Scripting
What are all Perl Internal Data Types
How to Create Scalar Values Manipulation in Perl Scripting
Array Search in Perl
How to Reverse an Array in Java Program
Perl  

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback