in reply to Running an external command
open FILE,"< generatedFile.txt" or die "cant able to read file [download]
or
@output = `/home/.../samtools view...` @fileout = `cat file.txt 2>&1`; [download]
This works only in unix