in reply to Re: Anyone know why I can't scrape this page?
in thread Anyone know why I can't scrape this page?

"I get a file not found page."

Upon closer review, I also get that error. The file that cannot be found is /nfl/odds/las-vegas/line-movement/jets-dolphins.cfm which I find odd seeing as the url in the script is nfl/odds/las-vegas/line-movement/jets-@-dolphins.cfm. (Notice the @ sign between the NFL teams).

Either escape the alleged array or use single quotes.

I'm so adjective, I verb nouns!

chomp; # nom nom nom

Replies are listed 'Best First'.
Re^3: Anyone know why I can't scrape this page?
by linuxer (Curate) on Sep 07, 2008 at 00:58 UTC

    The '@' is followed by an '-' here, which is not allowed as valid identifier.

    So it can't be an array. But to make sure I would use single quotes, too.

    Update: striked that rubbish. See my answer.

      So Perl sees that there is an '@' followed by a '-' and removes that from the string?

      I'm so adjective, I verb nouns!

      chomp; # nom nom nom

        Ah, sorry! I misunderstood my test outputs. '@-' *is* interpolated as array!

        update: Damn, '@-' is predefined and can be found in perlvar; Since I have never used it I wasn't aware of it.