Perl/Shell Knowledge Sharing
Perl Interview Questions and Answers
Tuesday, January 25, 2011
using each to iterate over an array
use strict;
use warnings;
my @array = (50..59);
while(my ($f, $g) = (splice @array, 0, 2)) {
print "f $f, g $g\n";
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment