Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Answer: How do you simulate the use of the keyboard ?

( #10957=categorized answer: print w/ replies, xml ) Need Help??

Q&A > input and output > How do you simulate the use of the keyboard ? contributed by chromatic

If you prefer not changing your filehandle, you can also cat (or perhaps echo, if you're stuck in Windows land) a file into your script:
#!/usr/bin/perl -w use strict; print while (<STDIN>);
Invoke it like this: cat printline.pl | ./printline.pl This trick works really really well for debugging CGI.pm applications from the command line.

Comment on Answer: How do you simulate the use of the keyboard ?
Select or Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-18 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls