in reply to parsing long text file
If it were me, I'd build a search-and-replace hash, then go against that for each row.
my %replace = ( iapw_p1 => "P1 = (inquiry, launch page)\n", iapw_p2 => "P2 = (car coverages, endorsements, operators)\n", iapw_p3 => "P3 = (notepad, scratch)\n" ) ; while ( <> ) { foreach my $key ( keys %replace ) { s/$key/$replace{$key}/g ; } print ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: parsing long text file
by Anonymous Monk on Jun 18, 2002 at 17:58 UTC | |
|
Re: Re: parsing long text file
by Anonymous Monk on Jun 18, 2002 at 18:27 UTC | |
by DamnDirtyApe (Curate) on Jun 18, 2002 at 21:48 UTC |