in reply to Command Line

In case of the first, you can call the program using system().

In case of the latter, things get tricky - you need a pipe to the program to supply it the filename, but you also need to read its results. A pipe to it could be done using open my $prog, "|program"; print $prog "$filename\n"; Reading its results could be done using backticks as in `program`. To combine both however, you need IPC::Open2.

Update: (Hours later.) Oopsie. Has to be print $prog "$filename\n"; and not print $prog, "$filename\n"; of course. I'm surprised noone caught else this sooner.

Makeshifts last the longest.