Re: perl warnings

2008-03-17 Thread Justin Hawkins
On 17 Mar 2008, at 21:58, Gunnar Hjalmarsson wrote: In this case, if I understand it correctly, the default version of the page, with a form, would appear. Why would that be a problem for anybody but the stupid user? ;-) Fundamentally, don't make it possible for your users to do anything

Re: perl warnings

2008-03-17 Thread Gunnar Hjalmarsson
Paul Lalli wrote: On Mar 17, 2:46 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: if ( ! $action ) {...} That'll work great until some jackass puts "?action=0" in the URL. So what? If you put random crap in the URL, you can't reasonably expect a meaningful response. In this case,

Re: perl warnings

2008-03-17 Thread Kashif Salman
On Mon, Mar 17, 2008 at 12:04 PM, Paul Lalli <[EMAIL PROTECTED]> wrote: > On Mar 17, 2:46 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > > Kashif Salman wrote: > > > I have a CGI script; when it runs the very first time I define some > variables > > > my $action = $q->param('action'); > >

Re: perl warnings

2008-03-17 Thread Paul Lalli
On Mar 17, 2:46 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > Kashif Salman wrote: > > I have a CGI script; when it runs the very first time I define some > > variables > > my $action = $q->param('action'); > > > The first time it runs, parameter 'action' isn't defined so that is > > how I c

Re: perl warnings

2008-03-17 Thread Paul Lalli
On Mar 17, 2:08 pm, [EMAIL PROTECTED] (Kashif Salman) wrote: > Hello, > I have a CGI script; when it runs the very first time I define some variables > my $action = $q->param('action'); > > The first time it runs, parameter 'action' isn't defined so that is > how I check that it is running the firs

Re: perl warnings

2008-03-17 Thread John W. Krahn
Kashif Salman wrote: Hello, Hello, I have a CGI script; when it runs the very first time I define some variables my $action = $q->param('action'); The first time it runs, parameter 'action' isn't defined so that is how I check that it is running the first time and do my things if ($aciton e

Re: perl warnings

2008-03-17 Thread Kashif Salman
On Mon, Mar 17, 2008 at 11:46 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > > Kashif Salman wrote: > > I have a CGI script; when it runs the very first time I define some > variables > > my $action = $q->param('action'); > > > > The first time it runs, parameter 'action' isn't defined so

Re: perl warnings

2008-03-17 Thread Gunnar Hjalmarsson
Kashif Salman wrote: I have a CGI script; when it runs the very first time I define some variables my $action = $q->param('action'); The first time it runs, parameter 'action' isn't defined so that is how I check that it is running the first time and do my things if ($aciton eq "") {...} elsif

Re: perl warnings

2008-03-17 Thread yitzle
I think you want: if( defined $q->param('action') ) { } else { } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

perl warnings

2008-03-17 Thread Kashif Salman
Hello, I have a CGI script; when it runs the very first time I define some variables my $action = $q->param('action'); The first time it runs, parameter 'action' isn't defined so that is how I check that it is running the first time and do my things if ($aciton eq "") {...} elsif ($action eq "sub