in reply to run a program on a file using sytem call
Have a look at the system() builtin (perldoc -f system), the chomp() builtin and the $^X variable described in the perlvar manpage.
Jenda Enoch was right! Enjoy the last years of Rome.