Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989972]
[ambrus]: so it doesn't work on my machine
[choroba]: i.e. I know JSON::Schema, I'm just curious whether there's a ready solution to plug it into a web service

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2016-12-08 12:57 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (141 votes). Check out past polls.