kepler has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I've got a perl script, main.pl, that generates a serie of results, after a search in a text file. From there, I created for each one a link in the form:
$map = "<a href='http://mydomain.com/cgi-bin/dir/sub.pl?v1=$v1&v2=$v2& +v3=$v3&v4=$v4'>View Details</a>";
wich, as you can see, if clicked, was suposed to call sub.pl Both, main.pl, and sub.pl, are fine in syntax (I've checked with the -w flag). The main generates the data, and the links: but when I click the link I get an Internal Server Error. I've checked the error log, but it doesn't show much, just a 500 error - it's from CPanel. sub.pl, just parses the line, and prints out a nice format of the variables passed. What can be wrong? Kind regards, Kepler

Replies are listed 'Best First'.
Re: Link not working in Perl script
by Anonymous Monk on Apr 12, 2011 at 07:28 UTC
      You guys are the best...at least on your jokes...I usually place in all my scripts:
      print "Content-type: text/html\n\n";
      In sub.pl, I forgot... sorry... I'll check the module you suggested - CGI::Carp::carpout. Thanks. Regards, Kepler
Re: Link not working in Perl script
by JavaFan (Canon) on Apr 11, 2011 at 20:52 UTC
    You have a bug somewhere. Maybe on line 23. Maybe somewhere else.

    Considering you show no code, and no useful error report, what else do you expect as an answer?

Re: Link not working in Perl script
by PyrexKidd (Monk) on Apr 11, 2011 at 22:27 UTC

    Something is broken, it must be line 42!

    Can you please provide some more of the code and a copy of the actual error log?

Re: Link not working in Perl script
by PyrexKidd (Monk) on Apr 14, 2011 at 08:40 UTC

    kepler: there is a genuine desire to assist you, hence the jokes;

    I've worked tech support for years and there is nothing I hate more than the "Something broke, fix it" call;

    If you feel you are being flamed, you aren't.

    my ESPN is dun' brokded, so I can't read your mind right now: please post the code we are dealing with, and the actual error log that doesn't show much. (i.e.: something is implicitly less than much but more than nothing and since it is not showing nothing and it is not showing much it must be showing 'something' which is between nothing and much... :P)