in reply to Strange way a string or array works

Try using Term::ReadLine to prompt you for a URL. Or, use GetOpt::Long and read the url in from the command line. Either of these options will be better than reading from STDIN.