IIRC Perl allows you to use pipes to interact with other programs. If you want to write to the standard input of a program, you have to create a file handler like this:
Code:
FH = open("| programname","w");
then any print FH "..." will be received by programname as input. Conversely, you can do
Code:
FH = open("programname |", "r");
and reading from FH will use the output of programname.
HTH!
PS: There has been a lot of time since the last time I programed in Perl, so the syntax could be slightly different.