#!/usr/bin/env perl
use strict;

my $input_fasta_file  = $ARGV[0];
open(my $input_file_handle, $input_fasta_file);

while ( <$input_file_handle> ) 
{
  my $line = $_;
  chomp($line);
  if($line =~ /^>/)
  {
    next;
  }

  if($line =~ /[^ACGTNacgtn-]/)
  {
    # The line contains a character we didnt expect so exit with an error
    die "The line contains a character we didnt expect\n";
  }
}

print "The file is valid\n";
