Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Multiple STDIN sources

by graff (Chancellor)
on Mar 10, 2004 at 03:54 UTC ( [id://335336]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "Do you want to process the stream?";
    my $ans = <STDIN>;
    
  2. or download this
    while (<>) {
       $stream .= $_;
    }
    
  3. or download this
    {
       local $/ = undef;
       $stream = <>;  # slurp all the data in one read
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://335336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found