I think I understand better:

#! perl

use strict;
use warnings;

my $idx;
my $old;

while (<DATA>) {
    $old = $_;  # Save $_
    s/(?:)/x/g; # Change $_
    ++$idx;

print "Line $idx - seen $old \t ... but is now $_" if $old =~ /(?:)/;
}
__DATA__


Line 3


Line 5

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to