Help for this page

Select Code to Download


  1. or download this
    $2=ab  # Only thing matched
    $2=a   # Only thing matched
    $2=a   # First thing matched
    
  2. or download this
    $2=ab  # Only thing matched
    $2=a   # Only thing matched
    $2=b   # Last thing matched
    
  3. or download this
    $ perl -e'"ab" =~ /((\w+)(?{print defined $^N ? "\$^N=$^N\n" : "\$^N n
    +ot defined\n"})){2}/;'
    $^N=ab
    $^N not defined
    $^N=b