Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -l
    
    ...
        $whatever =~ s/b/c/;
        print "After second match (in substitution): \$1=$1 \$2=$2";
    }
    
  2. or download this
    After first match (in if condition): $1=abc $2=def
    Use of uninitialized value $1 in concatenation (.) or string at ./pm_1
    +143443_match_vars.pl line 12.
    Use of uninitialized value $2 in concatenation (.) or string at ./pm_1
    +143443_match_vars.pl line 12.
    After second match (in substitution): $1= $2=