use lib "/home/chandu/dag/lib/perl5/";
use Bio::Perl;

    use Bio::SeqIO;
    # get command-line arguments, or die with a usage statement
    my $usage = "all2y.pl informat outfile outfileformat\n";
    my $informat = shift or die $usage;
    my $outfile = shift or die $usage;
    my $outformat = shift or die $usage;
 
    # create one SeqIO object to read in, and another to write out
    # *STDIN is a 'globbed' filehandle with the contents of Standard In
    my $seqin = Bio::SeqIO->new(-fh     => \*STDIN,
                                -format => $informat);
    my $seqout = Bio::SeqIO->new(-file   => ">$outfile",
                                 -format => $outformat);

    # write each entry in the input file to the output file
    while (my $inseq = $seqin->next_seq) {
         $seqout->write_seq($inseq);
    }
    exit;



