[Israel.pm] simple script question.

Offer Kaye offer.kaye at gmail.com
Sun Sep 26 07:49:55 PDT 2004

On Sun, 26 Sep 2004 14:10:34 +0000, Mikhael Goikhman <migo at homemail.com> wrote:
> This is not quite correct. "<>" is "<ARGV>", not "<STDIN>".
> There are several serious differences.

True, although I suspect that for Mark these don't matter too much, as
he originally wrote "The idea is if I have a file as follows:". File,
not files. Plus, sometimes it is better to fudge a little, for the
sake of clarity.

But you're right that I should have clarified that there is a
different usage of the script available, when using <STDIN> vs. <> .
So Mark, if you're using <STDIN>, I assume you use your script as
follows (correct me if I'm wrong):
   cat input_file | script.pl
If you switch to using <>, then you could still use it the same way,
but a better way (IMHO) is now possible:
  script.pl input_file

Offer Kaye

More information about the Perl mailing list