open INP, "< $ARGV[0]" or die "Cannot read file: $!"; open OUT, "> $ARGV[1]" or die "Cannot open file: $!"; @out = `/home/applications/samtools-0.1.7a/samtools view -bS $ARGV[0]`; print OUT @out; close INP; close OUT;