in reply to How do you simulate the use of the keyboard ?
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:
Invoke it like this: cat printline.pl | ./printline.pl This trick works really really well for debugging CGI.pm applications from the command line.#!/usr/bin/perl -w use strict; print while (<STDIN>);
In Section
Seekers of Perl Wisdom