in reply to Input from the User

in a very basic way this is what you want to accomplish...I guess you are asking for a name? And since the 'hello' portion is imputed upon the string...and the user isn't actually going to enter 'hello me' as the string, rather they would enter their name simply 'me', there is no way to account for someone entering 'bye bye soandso'. The snippet below accounts for the user entering nothing and then imputing a default string upon the user.

#!/perl -w use strict; print "enter user name: "; chomp(my $username =<STDIN>); if($username) {print "hello ". $username ."\n";} else {print "hello default user\n";}
I think I totally misunderstood the question... my apologies.