Print

Print


BP Jonsson scripsit:

> like "perl prog.pl file.txt"?

Yes.

> and file.txt goes to standard input?  Never
> knew that...

Almost.  The expression <> means "read a line from the concatenation
of the streams of files named on the command line; if there are no such
files, read from standard input".  In addition, if one of the specified
file names is "-", the standard input is read at that point.

--
John Cowan                              [log in to unmask]
http://www.reutershealth.com            http://www.ccil.org/~cowan
Humpty Dump Dublin squeaks through his norse
                Humpty Dump Dublin hath a horrible vorse
But for all his kinks English / And his irismanx brogues
                Humpty Dump Dublin's grandada of all rogues.
                        --Cousin James