bioperl

use strict;
use Bio::SeqIO;
use Data::Dumper;

my $filename="uniprot_sprot.dat";
my $sequence_object;
my $c;

my $seqio = Bio::SeqIO -> new   (
                                '-format' => 'swiss',
                                '-file' => $filename
                                );

while ($sequence_object = $seqio -> next_seq) {
$c++;
print Dumper $sequence_object;
my $sequentie = $sequence_object-> seq(); 
print $sequentie."\n";
last if $c > 1;
}