[Bioperl-l] need help

Marc Logghe Marc.Logghe at devgen.com
Fri Jan 23 09:04:31 EST 2004

> -----Original Message-----
> From: KHOUEIRY pierre [mailto:khoueiry at ibsm.cnrs-mrs.fr]
> Sent: Thursday, January 22, 2004 2:53 PM
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] need help
> Hi everyone;
> I wrote a script using bioperl methodes. In fact my problem isn't in 
> bioperl modules. I find problems on submitting my html form. When the 
> user browse a file, i can't open it. I used a post methode
> <Form  name="parameter" METHOD="POST" action="/cgi-bin/script.pl" 
> target="_blank">.
> <INPUT NAME="seqfile" TYPE="file" class = "text">

This should work when you set the enctype:

I've tried with this form:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>test</title>
<form method="post" action="http://mozarella/cgi-bin/test.cgi" enctype="multipart/form-data" name="mainform">
<INPUT NAME="seqfile" TYPE="file" class = "text">
<input name="submit" type="submit">

test.cgi looks like this:
use strict;
use CGI qw(:standard);
use Data::Dumper;
use Bio::SeqIO;

my $file  = param('seqfile');
my $in = Bio::SeqIO->new(-fh => $file, -format => 'genbank');
my $seq = $in->next_seq;

print header, pre(Data::Dumper->Dump([$seq],['seq']));


More information about the Bioperl-l mailing list