Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Asking the user about something is done in the perl part, not the imagemagick part. It has nothing to do with IM.
That resize method should also work just fine.
However be warned that the perl (or other) API's may not follow the Comannd Line API, in attempting to preserve an images aspect ratio. Basically test and make sure it does what you expect first.
Reading input is reading a line either from normal STDIN.
or if you are security concious (passwords), or are using STDIN for a file, then open "/dev/tty" and read a line from it.