Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to write a program to read stdin or command line?

by lyklev (Pilgrim)
on Oct 02, 2007 at 22:00 UTC ( #642252=note: print w/ replies, xml ) Need Help??


in reply to How to write a program to read stdin or command line?

Wow. Such a seemingly simple question, so much discussion.

If you say you want to read from STDIN or command line, I guess you want it to behave like cat. I guess someone else needs to understand it too.

while (<>) { chomp; print "$_ world\n"; }


Comment on Re: How to write a program to read stdin or command line?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-07-06 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls