JojoLinkyBob has asked for the wisdom of the Perl Monks concerning the following question:
Desert coderopen (fp,$ARGV[0]) || die ("Can't open $ARGV[0]! Exiting."); while (<fp>) { if (!m/^\s*\/\//) #Ignore commented lines { s/\/\/.*//g; while (m/([A-Za-z0-9_\.\:]+)/g) { if (exists $my_replacement{$1}) { s/$1/$my_replacement{$1}/; } } } print $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read In A File, Manipulate It, Spit It Back Out
by dsb (Chaplain) on Jul 07, 2001 at 01:09 UTC | |
by dvergin (Monsignor) on Jul 07, 2001 at 10:31 UTC | |
by JojoLinkyBob (Scribe) on Jul 07, 2001 at 01:53 UTC | |
|
Re: Read In A File, Manipulate It, Spit It Back Out
by I0 (Priest) on Jul 07, 2001 at 10:35 UTC | |
by JojoLinkyBob (Scribe) on Jul 17, 2001 at 02:20 UTC | |
|
Re: Read In A File, Manipulate It, Spit It Back Out
by MZSanford (Curate) on Jul 07, 2001 at 13:27 UTC |