Help for this page

Select Code to Download


  1. or download this
    #!perl -w
    use diagnostics;
    
    $_ = 'foo';
    s/(.)/\1/;
    
  2. or download this
    \1 better written as $1 at tmp.pl line 5 (#1)
     
        (W) Outside of patterns, backreferences live on as variables.  The
    + use
    ...
        substitution, but stylistically it's better to use the variable fo
    +rm
        because other Perl programmers will expect it, and it works better
        if there are more than 9 backreferences.