Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Range Operator in If Statement

by ww (Bishop)
on Jan 04, 2012 at 22:12 UTC ( #946302=note: print w/replies, xml ) Need Help??


in reply to Range Operator in If Statement

Another way, perhaps even related to the code in OP:
#!/usr/bin/perl use Modern::Perl; # 946284 my $ref = 7; for (1 .. 8 ) { if ($ref == $_) { say "\$ref: $ref"; # adjust output to id source of match? } else { say "Tain't workin'"; } }

Seems to me this might be readily expansible to your larger goal as outlined in Re^2: Range Operator in If Statement

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946302]
help
Chatterbox?
[Corion]: Hmm - that should be somewhere in the "Release Deployment Plan", but I don't find a good English link (nor a good German one ;) )
[thezip]: My project manager is asking "Why do we need this?" Ahem...
[Corion]: thezip: Wheee ;)
[stevieb]: LOL

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-02-23 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (350 votes). Check out past polls.