http://qs321.pair.com?node_id=1017011

shadowfox has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to check the value and make sure its a whole number between 1 and 75, so 1,2,3,4 but not 20.5 or 97 or -5, etc. In my head it makes sense, I've done both separately before, whats missing to make it work in this context? Better way to do it? I messed with it a bit with no luck so I come seeking wisdom :)
if ($_ =~ /\something(.*)somethingelse/i){ if($1 => 1 and $1 <= 75 and /\d{1}-\d{2}/) { ... } }