in reply to and multiple statements
meansprint "this is bad", next;
print("this is bad", next);
Disambiguate with parens
($istrue) or print("this is bad"), next; ($istrue) or (print "this is bad"), next;
Or use do as previously shown
($istrue) or do { print "this is bad"; next; };
But an if would be clearer.
if (!$istrue) { print "this is bad"; next; }
Update: Added missing "!" as per reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: and multiple statements
by cmac (Monk) on Jun 06, 2010 at 08:37 UTC | |
|
Re^2: and multiple statements
by JavaFan (Canon) on Jun 06, 2010 at 11:46 UTC | |
by ikegami (Patriarch) on Jun 06, 2010 at 19:22 UTC | |
by JavaFan (Canon) on Jun 06, 2010 at 21:12 UTC | |
by ikegami (Patriarch) on Jun 06, 2010 at 23:03 UTC |