in reply to looping through hash of hashes
Further to choroba's point about warnings and Athanasius's point 1 about prototypes (++both): Using warnings would have alerted you the fact that there was more than one unkosher thing about the way you were using prototypes. Without warnings:
And with:c:\@Work\Perl\monks>perl -le "use strict; ;; foo(); sub foo (my $x) { my $x = 'hiya'; print $x; } " hiya
c:\@Work\Perl\monks>perl -le "use strict; use warnings; ;; foo(); sub foo (my $x) { my $x = 'hiya'; print $x; } " Illegal character in prototype for main::foo : my$x at -e line 1. main::foo() called too early to check prototype at -e line 1. hiya
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: looping through hash of hashes
by Anonymous Monk on Dec 12, 2015 at 21:30 UTC |