sashac88 has asked for the wisdom of the Perl Monks concerning the following question:
$hashnew{$com} has value - the word "context". How do I make the script to treat $hashnew{$com} as it's value,i.e. in this case to treat it as context. Thanks a lot in advance.foreach (readline FILE1) { if (/$hashnew{$com}/){ print WFILE "$_\n"; } }
Edited by Chady -- code tags, fixed spaces in the code part.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File parsing
by dave_the_m (Monsignor) on Jun 30, 2004 at 11:31 UTC | |
|
Re: File parsing
by tachyon (Chancellor) on Jun 30, 2004 at 11:29 UTC | |
|
Re: File parsing
by borisz (Canon) on Jun 30, 2004 at 11:20 UTC | |
|
Re: File parsing
by calin (Deacon) on Jun 30, 2004 at 14:17 UTC |