[Novalug] a perl question

Megan Larko larkoc at iges.org
Fri Jan 5 11:08:07 EST 2007


Howdy,

To make it linux-related it is perl version 5.8.8 for x86_64 FC4 linux.

I am writing a script that will allow scientists to enter information about a data set the scientist 
is releasing to a test-study group.   The output of the perl script is a data.table.html file that 
may be viewed on the web by anyone.   Not just anyone can get to the script to enter the info.  I 
would like to be relatively secure in writing the script.   I would like to use the -w -T and use 
strict option.   The -w is cool; the use strict stops the program from running with the following 
errors:

[root at localhost cgi-bin]# ./news.data.test.cgi
Global symbol "@pairs" requires explicit package name at ./news.data.test.cgi line 45.
Global symbol "@pairs" requires explicit package name at ./news.data.test.cgi line 47.
Global symbol "%FORM" requires explicit package name at ./news.data.test.cgi line 53.
Global symbol "%FORM" requires explicit package name at ./news.data.test.cgi line 55.
Global symbol "%FORM" requires explicit package name at ./news.data.test.cgi line 55.
Global symbol "%FORM" requires explicit package name at ./news.data.test.cgi line 56

(for each and every FORM line entry, and then finally...)

Execution of ./news.data.test.cgi aborted due to compilation errors.

I have initialized my variables with "my $var = "";"   This included variables obtained from the 
FORM such as $FORM{'ContactEmail'}  and $FORM{'name'} as my $ContactEmail = ""; and my $name = "";
But the string FORM, I could not get to initialize.   a my $FORMP'ContactEmail'} did not work 
(syntax error on my part maybe?)  Also I do use the $ContactEmail as a var without the $FORM prefix 
elsewhere.   What "explicit package" does it want?

I am attaching the script (117 ASCII lines) so that those who wish to look may find the line 
numbers.   BTW, it works successfully without the "use strict" but as it is a web form I would like 
to use better security/checking measures.

Thank you,
megan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: news.data.test.cgi
Url: http://calypso.tux.org/pipermail/novalug/attachments/20070105/8a1b3b4e/attachment.pl 


More information about the Novalug mailing list