in reply to text file parsing
Further, you could likely generalize this into something like so, assuming a certain consistency to your tags:my $file = join('', <>); foreach (keys %replace) { $file =~ s/$_/$replace{$_}/g; }
$file =~ s/(iapw_..)/$replace($_}/g;Loop free, this should be much faster.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 3Re: Text File Parsing / Homegrown Template
by jeffa (Bishop) on Jun 18, 2002 at 22:11 UTC | |
by tadman (Prior) on Jun 18, 2002 at 22:22 UTC | |
by merlyn (Sage) on Jun 18, 2002 at 22:34 UTC |