in reply to Apache ignores ARGV[0] request

How do you call this script when it works? You should be using something like the CGI module, not reading @ARGV. It also sounds like you don't really understand the difference between CGI and mod_perl. You do not need mod_perl to run perl scripts under CGI.

Replies are listed 'Best First'.
Re^2: Apache ignores ARGV[0] request
by Anonymous Monk on Feb 07, 2005 at 02:39 UTC
    When it works, I call it with: www.commercialserver.com/cgi-bin/fileview.pl?2 When it doesn't work, I call it with: www.myserver.com/perl/fileview.pl?2 You are correct that I'm not terribly clear about the ramifications of mod_perl, but since it seemed that my Apache was unable to access the standard install of perl, I got desperate and "brought it inside" so to speak with mod_perl. It is ENTIRELY possible that I have a config problem with Apache, but I can't find it if it exists :>( Thanks ...
      It sounds like you are running it through mod_perl via Apache::Registry. It will not populate STDIN for you the same way that CGI does. You need to either go back to using CGI, which should work fine but you may need a little help, or switch from grabbing the args yourself to using something like the CGI module.