in reply to Re^3: Need help from the esteemed monks on scoping/hashes
in thread Need help from the esteemed monks on scoping/hashes
However, it looks like in the next block of the code beginning at line "if (/D_NET/){...", the hash "%mapping" is not visible with in the "if(/D_NET/){..." block of the script. Please help as I am a total noobeee with Perl. Thank you very much for all the suggestions. Best Regards, Dan.24 if (/NAME_MAP/ .. /PORTS/) { 25 next if (/NAME_MAP/); 26 next if (/PORTS/); 27 %mapping = split; 28 @keys = sort keys %mapping; 29 foreach $k1 (sort keys %mapping) { 30 print "$k1 = $mapping{$k1}\n"; 31 } 32 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Need help from the esteemed monks on scoping/hashes
by matze (Friar) on Jun 05, 2006 at 17:36 UTC |