Almost correct.
You can motify $. but you first have to have it pointing to the correct file handle:
- tyeprint "($.)\n"; # undefined $. = 10; print "($.)\n"; # 10, but for which file handle? print "ENTER: "; ''.<STDIN>; print "($.)\n"; # 1, for STDIN $. += 10; print "($.)\n"; # 11, still for STDIN print "ENTER: "; ''.<STDIN>; print "($.)\n"; # 12, not 2 !
In reply to Re: $. explained
by tye
in thread Tiptoe through the punctuation
by Mr. Muskrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |