#!usr/bin/perl use strict; use warnings; my $infile = "xxx_capillary_SNPs.txt\n"; #I'm identifying the file I want to open open $infile = || die "open infile failed\n"; #opening the input file chomp ($infile); #I'm trying to keep the first column and header rows of the file I'm opening for use in the output file my $A = 'T'; #change A to T my $C = 'G'; #change C to G my $G = 'G'; #change G to C my $T = 'A'; #change T to A { open $outfile = "$file + _revcomp\n" || die "open outfile failed\n"; #I want to make a new file entitled "xxx_capillary_SNPs_revcomp.txt as the outputfile print $A, $C, $G, $T to } print $outfile "\n"; close $infile close $outfile; print "script complete\n";