Just put the input in a file and reopen STDIN to read from that file before you call your sub.
-sauoq "My two cents aren't worth a dime.";
2005-10-28 Retitled by planetscape, as per Monastery guidelines
Original title: 'Re: Testing a subrutine with STDIN'
In reply to Testing a subroutine with STDIN
by sauoq
in thread Testing a subroutine with STDIN
by mulander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |