- or download this
use strict;
"blah" =~ /(a)/; # now we've set $1 at the global scope
...
$str =~ m/(\d+)/;
return $1;
}
- or download this
{
$_ = 'blah';
...
}
print "$1\n"; # unitialized warning
- or download this
$_ = 'blah';
...
print "$1\n"; # prints: b