Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: single line if conditional

by Anonymous Monk
on Mar 31, 2004 at 16:22 UTC ( [id://341332]=note: print w/replies, xml ) Need Help??


in reply to Re: single line if conditional
in thread single line if conditional

it fails not storing anything in the database. I am using strict and warnings but no-go.

I have a form with a field 'maxsize' and a button 'Submit'.

my $maxsize = param('maxsize'); if (param('Submit')) { if ($maxsize ne "") { $files{"$name"} = "this or that" if $name ne ""; print "somethign should have worked"; # this prints! } }

Replies are listed 'Best First'.
Re: Re: Re: single line if conditional
by dreadpiratepeter (Priest) on Mar 31, 2004 at 17:02 UTC
    assuming that the lastest code is a copying error and $name should read $maxsize, then the problem is not in the if statement, it is later in the code when you use %files to do something.
    modifying your print to include $files{$maxsize} would verify this.
    If the $name is in your existing code, then that explains your problem. Because $maxsize is the variable with the data.


    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://341332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-24 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found