Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: tieing STDIN & STDOUT using IO::Scalar for use inside an eval

by edan (Curate)
on Sep 12, 2004 at 11:51 UTC ( #390401=note: print w/replies, xml ) Need Help??


in reply to Re^3: tieing STDIN & STDOUT using IO::Scalar for use inside an eval
in thread tieing STDIN & STDOUT using IO::Scalar for use inside an eval

That's right... specifically, it depends on what is currently in @ARGV (if there's anything in @ARGV, the contents are treated as file names, and the files are magically opened and read from... if @ARGV is empty, it'll read from STDIN).

As long as we're getting specific, we might as well get it exactly right: The contents of @ARGV are always "treated as file names, and the files are magically opened and read from." If @ARGV is empty, then "$ARGV[0] is set to "-", which when opened gives you standard input." - perlop

So it really never reads from the filehandle named STDIN, but it might read standard input by opening the file named "-".

--
edan

  • Comment on Re^4: tieing STDIN & STDOUT using IO::Scalar for use inside an eval

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-09-23 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (131 votes). Check out past polls.

    Notices?