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

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

by BillKSmith (Monsignor)
on Aug 27, 2012 at 12:14 UTC ( [id://989974]=note: print w/replies, xml ) Need Help??


in reply to Short and easy way to write if...elsif syntax

There sure is more than one way to do it!

use strict; use warnings; $_ = 'foofum'; do{ my $print_buffer = /linux/ ? 'This is a linux VM' : /Windows/ ? 'This is a Windows VM' : 'I have no idea what it is' ; print $print_buffer, "\n"; };
Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found