in reply to Re: Using a Hash Variable in an If Statement
in thread Using a Hash Variable in an If Statement
If my file I'm trying to read in is called rat_event, should I open it above, such as here:my %data; while (<DATA>) { next if /mcp/; chomp; my ($s, $n) = split; push @{ $data{$s} }, $n; }
and then do:open(rat_event,"RAT_EVENT"); @rat_event = <rat_event>;
Thanks for the help.my %rat_event; while <RAT_EVENT> { # Same as above }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using a Hash Variable in an If Statement
by edimusrex (Monk) on May 11, 2015 at 20:32 UTC | |
by Bama_Perl (Acolyte) on May 11, 2015 at 20:36 UTC |