Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Using IF and OR, I'm sure there is a better way

by l3v3l (Monk)
on Dec 15, 2005 at 22:02 UTC ( [id://517089] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    print $& if $var =~ /^[1-3]$/;
  2. or download this
    sub look_into {
       my $archetype= shift;
    if($single_digit_in_range ->($_)){ print "single digit in range!" }
    if($double_digit_in_set   ->($_)){ print "double digit in set!" }