in reply to RE: Re: Using in multiple passes
in thread Using in multiple passes

Yes, of course.

Just for curiousity, i tried the following:

#!/usr/bin/perl -w while(<>) { print }; seek(STDIN, 0, 0) or die; print "-----PASS 2-----\n"; while(<>) {print}
and ran it with:     > ./t.pl < t.pl and it did read the file twice! How come?
(I was expecting an error like 'non-seekable file' or so.)

When doing

>cat t.pl | perl t.pl
it died where it should have (i.e. in the seek()).

Replies are listed 'Best First'.
RE: RE: RE: Re: Using in multiple passes
by merlyn (Sage) on Oct 25, 2000 at 18:26 UTC