Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Short and easy way to write if...elsif syntax

by Athanasius (Monsignor)
on Aug 27, 2012 at 11:57 UTC ( #989972=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
    print /linux/   ? "This is linux VM\n"     :
          /Windows/ ? "This is a Windows VM\n" :
                      "I have no idea what it is\n" for @array;
    
  2. or download this
    This is linux VM
    This is a Windows VM
    I have no idea what it is
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-12-20 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls