Chris Charley wrote:
>
> ----- Original Message ----- From: ""John W. Krahn"" <[EMAIL PROTECTED]>
>>
>> And if you want to do it with one loop:
>>
>>
>> for my $i ( reverse 0 .. $#file ) {
>> splice @file, $i, 1 if /foo/;
>> }
>
> Hi John
>
> Shouldn't the above read like:
>
> for my $i ( reverse 0 .. $#file ) {
> splice @file, $i, 1 if $file[$i] =~ /foo/;
Yes it should, sorry about that mistake.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>