open FILE,"< generatedFile.txt" or die "cant able to read file #### @output = `/home/.../samtools view...` @fileout = `cat file.txt 2>&1`;