Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Why isn't this subroutine working?

by eric256 (Parson)
on May 20, 2009 at 17:57 UTC ( #765292=note: print w/replies, xml ) Need Help??

in reply to Why isn't this subroutine working?

elsif expects to get a condition as well. so your example should be

if (!$Ok) { print "x"; } elsif ($some_other <> $condition) { print "y"; }

Not including the condition does indeed make the elsif into a syntax error, and elsf does indeed make it run, but it doesn't make it work.

Oh and please please please don't embed variables in SQL unless you properly untaint them first, and even then only do it if someone is holding a gun to your head ;)

Eric Hodges

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://765292]
[Discipulus]: mmh.. if I say say for glob '{0-0}|{1-0,1-1}|{ 2-1,2-2}|3-2' I obtain what I expected, but no if I put a space instead of pipes.. why?
[choroba]: spaces have special meaning in glob
[choroba]: backslashing them should help
Discipulus ...Note that glob splits its arguments on whitespace..
[Discipulus]: oh it passed also some days ago iirc
[Discipulus]: thanks

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-03-20 11:57 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (250 votes). Check out past polls.