use strict;
use warnings;
my @arr = ("Mio", "Ritsu");
printArray(@arr);
push(@arr, "Yui");
push(@arr, "Tsumugi");
printArray(@arr);
my $name = pop(@arr);
print($name, "\n");
printArray(@arr);
sub printArray {
foreach (@_){
print();
print(" ");
}
print("\n");
}
Some Useful Array Functions
Monday, December 24, 2012
Perl 에서의 array 사용 예
Labels:
Perl
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment