in reply to Re: [Homework Question] Subroutines & References
in thread [Homework Question] Subroutines & References

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:  <%-(-(-(-<