- 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
- or download this
#!C:/Perl/bin -w
print "\n\t\$0 is: " . $0 . "\n\n";
...
} else {
print "\n\tNo match\n";
}
- 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
- 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";
- or download this
$foo: |f:\_wo\pl_test\669947.pl| before the substitution
And, after the substitution: |669947.pl|
C:\>