in reply to Validation of UserInput is a positive Integer or not?

I think what you meant to write was

if ($days =~ /^\s*[1-9][0-9]*\s*$/)

The way you wrote it, it would only match a value of $days equal to "1-90-9" plus or minus leading/trailing spaces and the last nine.

Much better is the approach taken by toolic, ww, and Apero.