foreach $i (@array) { ... }
Posted code won't run under strictures due to non-declaration of $i iterator. Making $i lexical fixes this:
foreach my $i (@array) { ... }
(Running with use strict; and use warnings; is highly recommended for beginning Perl programmers — and for non-beginners as well!)
Give a man a fish: <%-(-(-(-<
In reply to Re^2: [Homework Question] Subroutines & References
by AnomalousMonk
in thread [Homework Question] Subroutines & References
by Hayest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |