[Bioperl-l] CGI and BioPerl Re: Bioperl-l Digest, Vol 71, Issue 6

Chris Fields cjfields at illinois.edu
Sun Mar 15 22:41:37 UTC 2009


Sanjay,

This needs to stay on the list for archiving.

I'm unsure about how CGI works on Windows but several things about  
this script appear fundamentally incorrect.  Are you trying to comment  
out lines c-style?  Perl comments start with '#'.  Also, under 'use  
strict' you must declare scope on all variables using 'my', 'our',  
etc.  You also don't 'use Bio::DB::RefSeq' (a compile-time fail) and  
'use DBI' w/o actually using DBI.

I'll say this nicely: I'm wary about proceeding with this further  
unless you can establish you understand some of the basic fundamentals  
of Perl programming.  The issues above make me think you need to brush  
up on that a bit.

chris

On Mar 15, 2009, at 10:33 AM, Sanjay Harke wrote:

> Dear charis,
>
> following script s not working with cgi script
>
> #!c:\perl\bin\perl.exe
>
> print "Content-type: text/html\n\n";
>
> //use warnings;
> //use CGI;
> use strict;
> //use CGI qw(standard);
> use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
> use DBI;
>
> use Bio::DB::RefSeq;
>
> $gb = new Bio::DB::RefSeq;
>
> $seq = $gb->get_Seq_by_acc('NM_007304');
>
> print $seq->seq();
>
> kindly guide me in this script execution
>
> but one thing i want clear following script is working with command  
> line
> #!/usr/local/bin/perl
>
> # Get a sequence from RefSeq by accession number
>
> use Bio::DB::RefSeq;
>
> $gb = new Bio::DB::RefSeq;
>
> $seq = $gb->get_Seq_by_acc('NM_007304');
>
> print $seq->seq();
>
> kindly help me for cgi execution
>
> sanjay




More information about the Bioperl-l mailing list