Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: conditional syntax options

by citromatik (Curate)
on Jun 28, 2009 at 14:30 UTC ( #775465=note: print w/ replies, xml ) Need Help??

in reply to conditional syntax options

The code you provide is clear and concise enough, I would stay with it. But, just for curiosity, since Perl 5.10 you can use the smart-match (~~) operator for a shorter alternative (see perlop):

  • if (! $string ~~ qw/A B/)
  • if ($string ~~ qw/A B/)
  • citromatik

Comment on Re: conditional syntax options
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2016-02-09 21:46 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (326 votes), past polls