Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
more useful options
 
PerlMonks  

Re: if variants

by itub (Priest)
on Oct 19, 2004 at 08:31 UTC ( [id://400490]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to if variants

Note that you can do more than one thing on a "one-line if" by using the comma operator:

$state = 3, next if $tok eq 'a';

Replies are listed 'Best First'.
Re^2: if variants
by Anonymous Monk on Oct 19, 2004 at 10:11 UTC
    Or more generally, with a do statement:
    do {local($,) = (','); print(@array);} if $tok eq 'a';
Re^2: if variants
by dimar (Curate) on Oct 19, 2004 at 11:34 UTC

    or more generally, with a CODEREF

    sub{ MowLawn(); WashCar(); InvadePakistan();}->() if $bNotRaining;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://400490]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.