in reply to Collecting a piped command line
You could turn it around so that the previous stuff is the command line for the Perl script then use system to execute the other stuff.