in reply to Re: Perl Hash
in thread Perl Hash
the error ismy $HashKey = $_[4]; $HashKey += 1; # initialise the hash my %LogHash = (); while (<LOGFILE>){ if (/\b$Autosys/) { # populate the hash %LogHash = ($HashKey => $SentRec = substr($_, 0, 20)); } } # debugging stub # print out the contents of the hash foreach $k (keys(%LogHash)) { print LOGFILE $k, ",", $LogHash{$k}, "\n"; }
So I'm not there yet...Global symbol "k" requires explicit package name at ./pmc_tester.pl li +ne 183. Execution of ./pmc_tester.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl Hash
by davorg (Chancellor) on Jul 26, 2005 at 09:12 UTC | |
|
Re^3: Perl Hash
by reasonablekeith (Deacon) on Jul 26, 2005 at 09:21 UTC | |
by TechNoFear (Initiate) on Jul 26, 2005 at 09:33 UTC | |
by davorg (Chancellor) on Jul 26, 2005 at 09:51 UTC | |
by GrandFather (Saint) on Jul 26, 2005 at 09:55 UTC | |
by GrandFather (Saint) on Jul 26, 2005 at 10:15 UTC | |
by Random_Walk (Prior) on Jul 26, 2005 at 10:02 UTC | |
by Iron (Scribe) on Jul 26, 2005 at 09:58 UTC |