more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
In your example, you don't need the $_. This will print lines 1 and 2 from the file test.txt: Assuming an OS that follows the POSIX spirit, this will also print the first two lines of a file, but probably without reading the entire file, and probably without starting an interpreter:
Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-) In reply to Re^2: How does $. work in one liner?
by afoken
|
|