Help for this page

Select Code to Download


  1. or download this
    C:\>perl f:\_wo\pl_test\669947.pl
    
            $0 is: f:\_wo\pl_test\669947.pl
    
    
            nikhil.patil's $2 is: f:\_wo\pl_test\669947.pl
    
  2. or download this
    #!C:/Perl/bin -w
    
    print "\n\t\$0 is: " . $0 . "\n\n";
    ...
    } else {
    print "\n\tNo match\n";
    }
    
  3. or download this
    ww's failed
    
    
    ...
             $2 is: |f:\_wo\pl_test\669947.pl|
    
             $2 is the whole of $0 because lookarounds, when completed, di
    +scard all intermediate info
    
  4. or download this
    $foo = $0;
    
    print "\n\t \$foo: |$foo| before the substitution \n";
    
    $foo =~s/^.*\\//;
    print "\n\t And, after the substitution: |$foo| \n";
    
  5. or download this
             $foo: |f:\_wo\pl_test\669947.pl| before the substitution
    
             And, after the substitution: |669947.pl|
    
    C:\>