#!/usr/bin/perl -w
use strict;
die "Usage: $0 <file>\n" unless (@ARGV == 1);
my $lines = 0;
my $bases = 0;
while (my $line = <>){ # <> operator reads one line at a time from the file specified by $ARGV[0].
chomp $line;
next if $line =~ /^>/;
$lines++;
$bases += length($line);
}
print "$bases\n";