Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Conditional for statement block (not just bare statement)

by ikegami (Patriarch)
on Dec 16, 2008 at 20:32 UTC ( [id://730735]=note: print w/replies, xml ) Need Help??


in reply to Conditional for statement block (not just bare statement)

do{print "miney\n"; print "moh\n";} if $cond;

Update: For fun:

map{print "miney\n"; print "moh\n";} 1 if $cond;
grep{print "miney\n"; print "moh\n";} 1 if $cond;
sub{print "miney\n"; print "moh\n";}->() if $cond;
sub doif(&$) { $_[0]->() if $_[1] } doif{print "miney\n"; print "moh\n";} $cond;
print("miney\n"),print("moh\n") if $cond;
(print "miney\n"),(print "moh\n") if $cond;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-03-29 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found