Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 ? - Answer 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.

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: (3)
As of 2016-08-27 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (379 votes). Check out past polls.