in reply to Re^3: using pagecount variable in array?
in thread using pagecount variable in array?

> "what was failing for you in the first place?"

I was getting "Internal Server Error" pages:

Internal Server Error The server encountered an internal error or misconfiguration and was u +nable to complete your request. <snip>
As soon as I changed for $i (@pages) to for my $i (@pages), the script worked.

Thanks again,

-Bob

Replies are listed 'Best First'.
Re^5: using pagecount variable in array?
by CountZero (Bishop) on Jul 23, 2006 at 18:32 UTC
    Of course: Perl threw you an error saying --as per use strict-- Global symbol "$i" requires explicit package name at ... and that unexpected error message played havoc with the headers of your HTML-page.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re^5: using pagecount variable in array?
by Ieronim (Friar) on Jul 23, 2006 at 18:42 UTC
    use CGI::Carp qw/fatalsToBrowser/;
    in future while developing your CGI scripts :) It will protect you from many mysterious problems ;)

         s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
      But only use it on the development server and not on the production site as you never know what data might be exposed by an unexpected error. It would not be too good for the world to see your passwords and logins on the Internet!

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law