in reply to Extracting up to a certain string
my @foo; { local $/ = 'certain string'; open my $file, '<', '/path/to/afile' or die $!; @foo = (<$file>)[0..2]; }
Now @foo contains everything up to and including the third occurance.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extracting up to a certain string
by sauoq (Abbot) on Aug 04, 2002 at 08:35 UTC |