in reply to tie:file get record number

Update: Ignore, I completely misread the OP's requirements

my $count = 0; for ( @array ) { $count += s/PERL/Perl/g; } print $count;

Update 2: This seems more like what you want:

my @numbers; for ( 0 .. $#array ) { push @numbers, $_ if $array[$_] =~ s/PERL/Perl/g; } print join ', ', @numbers;

Update 3: ...which, I see now, actually adds very little value to johngg's post above :-)

Replies are listed 'Best First'.
Re^2: tie:file get record number
by smbs (Acolyte) on Nov 18, 2006 at 14:59 UTC
    Many thanx works great
    Smbs