Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: what is benefit of unless ?

by Anonymous Monk
on Feb 05, 2005 at 12:04 UTC ( #428302=note: print w/replies, xml ) Need Help??

in reply to what is benefit of unless ?
in thread unless statements

You can use "else" with "unless".

"unless" means "if not", so it reverses the meaning of an "if" comparison.

See perlsyn for details.

Please read Where should I post X? and How (Not) To Ask A Question.

Replies are listed 'Best First'.
equivalent code for unless
by Anonymous Monk on Feb 05, 2005 at 12:15 UTC
    is this the equivalent code for " unless(condition)" ? if !(condition) { ... ... } else { ... ... } reply soon, barun parichha
Re^2: what is benefit of unless ?
by flight on Mar 23, 2006 at 13:22 UTC
    You can use the if/else statement intead of "unless" but it requires more commands of if/else than "unless" and the loop continues as long we required

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://428302]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-12-16 00:24 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (446 votes). Check out past polls.