in reply to need idiom - compare a number to a string

I think just doing int($value) eq $value should work (will still throw a warning if $value is undef). You could also regex it with something like $value =~ /^[+-]?\d+$/ or Regexp::Common::number.