$result=`cat $file | anotherscript.pl`; #### # Note: Code untested! my @none=grep { chomp; /NONE$/ } qx(anotherscript.pl <$file);