in reply to RE: Re: Using in multiple passes
in thread Using in multiple passes
Just for curiousity, i tried the following:
and ran it with: > ./t.pl < t.pl and it did read the file twice! How come?#!/usr/bin/perl -w while(<>) { print }; seek(STDIN, 0, 0) or die; print "-----PASS 2-----\n"; while(<>) {print}
When doing
it died where it should have (i.e. in the seek()).>cat t.pl | perl t.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Re: Using in multiple passes
by merlyn (Sage) on Oct 25, 2000 at 18:26 UTC |