On Wed, 24 Nov 2004, FlashMX wrote:
> I'm trying to understand the logic. When you open a file each line is
> read in one at a time. At that point you can do whatever you want to
> that line. In my case a search and replace.
>
> Can I do two search and replaces on the same line or would I have to
> open the file again for a second pass?
You answered your own question -- "you can do whatever you want to that
line".
while <> {
my $line = $_;
$line = sub_one( $line );
$line = sub_two( $line );
}
Etc.
--
Chris Devers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>