# @pages is an array holding the filenames, read in from another file.
# Here's the suspect code: (with line numbers).
# 
# 42: print "|$pages[0]|\n";
# 43: open(PAGE, "<", "http;^^dri.cornell.edu^pub^People^davis.html") || die("can't 
open $pages[0]: $!");
# 44: close(PAGE);
# 45: open( PAGE, "<", $pages[0]) || die("can't open $pages[0]: $!");
# 46: close(PAGE);

My initial gut reaction to this (despite the fact that it seems to be
correct code) is that any filename with semicolons and circumflexes is
probably a risky filename to begin with. :)

# This seems to be somehow linked to the way I am generating the list,
# but I'm not sure how. (I added the |'s above to check for whitespace).

How are you generating the list, and what leads you to believe that
such generation would have this kind of effect?  I'd recommend
something like this:

  open FILE, "/path/to/file" or die "Can't open file.";
  my @pages = <FILE>;
  chomp @pages;
  close FILE;

-- 

  Jonathan Daugherty
  http://www.cprogrammer.org

  "It's a book about a Spanish guy called Manual, you should read it."
                                                            -- Dilbert
_______________________________________________
PDXLUG mailing list
[EMAIL PROTECTED]
http://pdxlug.org/mailman/listinfo/pdxlug

Reply via email to