Perl/Shell Knowledge Sharing
Perl Interview Questions and Answers
Tuesday, January 25, 2011
how to reverse an array without reverse function
@array = qw(a b z c e);
while(@array) {
$last = pop(@array);
push(@array1, $last);
}
print @array1;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment