in reply to can't read URL from tab delim

The code you posted doesn't have 17 lines, so the code is likely not responsible for the error messages you posted.

You are reading in a file but you aren't stripping the newlines off the lines read in. Hence $url will have a newline at the end. It is possible but unlikely that your files have names with a newline at the end, so you better strip the newlines after reading the files:

chomp @file;

As a general tip, never just print out a variable for debugging - always print it out enclosed in some delimiters so you can easily spot leading or trailing whitespace:

print "Url is '$url'\n";

Replies are listed 'Best First'.
Re^2: can't read URL from tab delim
by Fletch (Bishop) on Apr 17, 2007 at 16:22 UTC

    Taking that tip further, you might want to get in the habit of using one of the data structure serialization modules (Data::Dumper, YAML::Syck) to print out values in debug messages. That way you don't have to go back and add more debugging scaffolding when you have to start tracking down what exactly ARRAY(0xdeadbeef) contains.

A reply falls below the community's threshold of quality. You may see it by logging in.