[EMAIL PROTECTED] wrote:

> This is really strange.  I have a method that works and returns all the
> values in a file for the cgi object.  But on the second call to the script it opens
> the file and returns none of the cgi parameters.
>
> the $cgi->param( ) returns POSTDATA
> and the keywords( ) returns nothing.
> I'm using strict and warnings
>
> sub readpics{
> print STDERR "\n readpics ";
>   if(-e "./pic_urls.txt"){
>   if(open(PICSR, "./pic_urls.txt")){
> #  it gets here just fine.
> print STDERR "\n exists pic_urls.txt";
>      my$pm;{no strict;$pm = new CGI(PICSR);

are you sure this handle is a proper argument to the CGI constructor?  It seems at
least that it should use a reference to the typeglob
CGI(\*PICSR)

>
> if($pm){
> [EMAIL PROTECTED] = $pm->param( );

Please do not jam your scope indicator together with the identifier you are declaring.
It just makes both less clear.
my @p = $pm->param( );

>
> [EMAIL PROTECTED] = $pm->keywords( );
> print STDERR "\n param @p\n keywords @q";
>         for(my$i=0;$i<$numpics;$i++){

Operators, except for dereferencing or indexing operators, should have spaces around
them:
for (my $i = 0; $i < $numpics; $i++){

There is neither virtue nor any techological advantage in self-torture.  Scrunched eyes
do not contribute to clear thinking.  Give your code some space so that each token is
clear.

> any suggestions?

Yes.  Start paying attention to indentation.  When you have properly indented the code,
repost it.  I am not sure what system you are using for indentation, but without
something more standard, I would hesitate to try to sort out content.

Sorry I haven't dealt with logical content here.  There is no point.  The lack of
consistent formatting, if not addressed and corrected, will effectively prevent you
from keeping track of any code of more than trivial size.

As we say in Crisis Intervention: "Ground, Process, then Content"  I'm not going to
recommend meditation techniques or anything, but the coding process here is one that
needs to be dealt with in order to effectively deal with logical

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to