Your code isn't going to compile. You have an extra } hanging out, and you have a boolean comparison in there, but nothing is using it. (thats the eq function). I didn't see any environment variable stuff in your first script, so I'm not sure where you are getting the variable from. Remember that the %ENV hash is provided to a script from the parent process, and any alterations that you make to it are local. The changes don't affect the parent, only the children.
#!/usr/local/bin/perl
use CGI qw(:standard);
@jid = param('JobID');
print "Content-type: text/html\n\n";
print "<head><title>TEST SCRIPT</title>";
print "</head><font size=2 face=arial><p>";
foreach $jid (@jid)
{
print "+$jid";
}
$ENV{'QUERY_STRING'} eq (print "+$jid");
#$ENV{'QUERY_STRING'} = print "+$jid";
} # This bracket shouldn't be here.print "<p><a href=http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRI
+NG'}>http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRING'}</a><p>"
+;
print "<p><a href=http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRI
+NG'}>http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRING'}</a>";
print "</FORM><p></center></center></td></tr></table></BODY>";
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.