Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by BillKSmith (Curate)
on Aug 27, 2012 at 12:14 UTC ( #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
Comment on Re: Short and easy way to write if...elsif syntax
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2016-05-27 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?