Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by Athanasius (Chancellor)
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?
Eily went to the wiktionary to check that the pronunciations of prawn and prone are actually similar. Turns out prawn can be an alternative form of porn...
[Discipulus]: well i'm still at the end of the food chain..
[Discipulus]: so a new life as krill in prague will be good
[erix]: wtf -- what's the idea, is this trolling, advertising, or what?
[Discipulus]: but realisticly choroba your company would a hire a programmer as me?

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2017-06-29 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (662 votes). Check out past polls.