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 :)

The code works, just not in my context, which is much the same as mine, it seems to be something with pulling the value from between the keywords and putting it in $1 but that's what I need in this case.
Toying a bit more I ended up with this, which works for my need even if a bit clumsy, can anyone shed light on why it needs to be set in a new variable? The same digit check used in the primary check on $1 just won't work for me but this does.

The above is OK (Yes, I know OP wants only INTs, but this is a minimal example of the death-star problem) when the greedy ".*" is limited by the "?" but it's definitely not what the OP seems to want if the limit ("?") is omitted.