Help for this page

Select Code to Download


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