S
synthespian
hello --
I can find no reasonable explanation for this behavior. Not theat
there's isn't one (a trivial one at that), but I am having a hard time
finding the reason for this:
#!/usr/bin/perl
@array = subthis(1, 2, 3, 4);
sub subthis {
@array = @_;
foreach (@array) {
print "$array[$_]\n";
}
return (@array);
}
print "Finished\n";
$ perl subrout2.pl
2
3
4
Finished
Whatever happened to the "1"?
Is this behavior to be expected? Why?
I get the same response in Perl 5.6 and 5.8
TIA
Henry
I can find no reasonable explanation for this behavior. Not theat
there's isn't one (a trivial one at that), but I am having a hard time
finding the reason for this:
#!/usr/bin/perl
@array = subthis(1, 2, 3, 4);
sub subthis {
@array = @_;
foreach (@array) {
print "$array[$_]\n";
}
return (@array);
}
print "Finished\n";
$ perl subrout2.pl
2
3
4
Finished
Whatever happened to the "1"?
Is this behavior to be expected? Why?
I get the same response in Perl 5.6 and 5.8
TIA
Henry