note
toolic
You are missing a closing (right) curly for the <c>while</c> loop, as the asymmetric indentation suggests. Here's the [mod://perltidy] version
(Tip #10 from the [Basic debugging checklist]):
<c>
#!/usr/bin/perl -w
use strict;
use diagnostics;
my $file = "$ARGV[0]";
open( DAT, $file ) || die("Can not open file!");
while (<DAT>) {
my $seq = $_;
if ( $seq =~ m/^[ATCG]+$/ ) {
my $DNA = '';
$DNA = $seq;
my $revcom = reverse($DNA);
$revcom =~ tr/ACGTacgt/TGCAtgca/;
print $revcom;
}
}
</c>
<p>I also got rid of the trailing semicolon after your right curly.
1227547
1227547