in reply to RE: RE: Hard Lessons
in thread Hard Lessons
$MY = 1; $LOC = 1; { local $LOC; local $LOC2; local $/; local $^T; my $MY; my $MY2; printf "LOC defined: %s\n", defined $LOC ? "YES" : "NO"; printf "LOC2 defined: %s\n", defined $LOC2 ? "YES" : "NO"; printf "IRS defined: %s\n", defined $/ ? "YES" : "NO"; printf "TIME defined: %s\n", defined $^T ? "YES" : "NO"; printf "MY defined: %s\n", defined $MY ? "YES" : "NO"; printf "MY2 defined: %s\n", defined $MY2 ? "YES" : "NO"; print " LOC=$LOC, LOC2=$LOC2, TIME=$^T, IRS=$/, MY=$MY, MY2=$MY2\n" +; } print "AFTER LOOP:\n"; print " LOC=$LOC, LOC2=$LOC2, TIME=$^T, IRS=$/, MY=$MY, MY2=$MY2\n";
Which produces:
LOC defined: NO LOC2 defined: NO IRS defined: NO TIME defined: YES MY defined: NO MY2 defined: NO LOC=, LOC2=, TIME=0, IRS=, MY=, MY2= AFTER LOOP: LOC=1, LOC2=, TIME=960648360, IRS= , MY=1, MY2=
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: RE: Hard Lessons
by chromatic (Archbishop) on Jun 10, 2000 at 21:25 UTC |