in reply to Input from the User

I'm not really sure what you're asking. You've already got most of the code you need. If you want to do some kind of default thing, do this:
$entered_string = "default_text" if $default_text eq "";
This looks suspiciously like homework....

The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa