۰۴آذر
#!/usr/local/bin/perl
#
# Reverse a list in place.
# list is provied as command
# line arguments.
#
use strict;
use warnings;
sub rev {
my $i = 0;
my $j = $#_;
while ($i < $j) {
@_[$i, $j] = @_[$j, $i];
$i++;
$j--;
}
return @_;
}
my @arr = rev @ARGV;
print "@arr\n";
۹۳/۰۹/۰۴