if ( <INPUT_FILE> =~ m/[^actgACTG\s]/ ) {
...
Are there any potential problems with this code?
The character class \s includes ' ' (space, 0x20) and IIRC \t \n \r \f other whitespace characters. Your test allows the string read from the file to have any number of any combination of these characters. Please see perlrecharclass.
I must say that I don't understand your desparate, last-ditch efforts to avoid the use of chomp, for it seems very likely that the line you're reading from your file is newline-terminated (whatever a newline happens to be in your OS). Here's how I might handle the file-read-and-validate portion of your program (untested):
use warnings;
use strict;
die "no filename given" unless @ARGV;
my $filename = $ARGV[0];
open my $fh_input, '<', $filename or die "opening '$filename': $!";
my @lines = <$fh_input>;
die "no lines read from '$filename': $!" unless @lines;
close $fh_input or die "closing '$filename': $!";
chomp @lines;
die "more than one line in '$filename'" unless @lines == 1;
my $line = $lines[0];
die "'$filename' contains something other than ACTG sequence"
if $line =~ m{ [^actgACTG] }xms;
my $result = do_something_with($line);
print "result is: 'result'";
exit;
sub do_something_with { ... }