in reply to Net::Ping blowed my mind

I don't know this module, but maybe you should chomp $url.