in reply to Re^5: write and read the same file not display the output
in thread write and read the same file not display the output
$1 is initialized via regex captures which use parentheses. For example, in the following:
my $string = 'Frank'; my $name = 'Frank'; print $1 if $string =~ /^$name$/; print $1 if $string =~ /^($name)$/;
The first print statement produces:
Use of uninitialized value $1 in...
Whereas, the second print shows the value in $1:
Frank
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: write and read the same file not display the output
by Rudolf (Pilgrim) on Sep 05, 2012 at 13:09 UTC |
In Section
Seekers of Perl Wisdom