#!/usr/bin/perl -w if (@ARGV==0) { die "Usage: countseq.pl \n"; } my $prog = "/usr/ncbi/blast2/xdformat -n -i $ARGV[0]"; my $strOutput; my @output = `$prog`; foreach my $line (@output) { if (/^No. of sequences \(letters\): ([\d,])\s/) { $strOutput = $1; } } die "No output gathered \n" unless defined($strOutput); print $strOutput;