I have a lots of .txt files containing numerical data.
The following code opens a program called platon and it in turn opens a single .txt file and does various things with it.
($in_filename, $out_filename) = @ARGV;
$out_filename = $in_filename if ( !($out_filename) );
$ins_filename = "$in_filename.txt";
system ("platon -c $txt_filename");