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

I have been reading most the day trying to learn before I ask but find only explaination of $ENV with {whatever_oneneeds} but nothing about making a url that is linkable into html tags.

What I need to do is add this

$sellerfeed <br><font size=-1><a href=$ENV{'SCRIPT_NAME'}\?action=viewfeed\&user=$alias>[View Sellers Feedback]</A></font></TR></TD>

to this

print "<B>Offered By:</B> <A HREF=mailto:$email>$alias</A></TR></TD><TR><TD BGCOLOR=$config{'colortablebody'}><B>Current Time:</B> $nowtime</TD></TR><TR><TD BGCOLOR=$config{'colortablebody'}><B>Closes:</B> $closetime<BR><FONT SIZE=-2>Or $config{'aftermin'} minutes after last bid...</FONT></TD></TR><TR><TD BGCOLOR=$config{'colortablebody'}><B>Number of Bids:</B> $#bids</TD></TR><TR><TD BGCOLOR=$config{'colortablebody'}>";

The script add-on aurthor ( who is not reachable ) says to replace the 1st over the 2nd but you would loose all the other needed script.

I tried this after the email alias but get Global symbol "$sellerfeed" requires explicit package.

<TR><TD BGCOLOR=$config{'colortablebody'}><B>Seller's Feedback:</B>$sellerfeed <a href=$ENV{'SCRIPT_NAME'}\?action=viewfeed\&user=$alias>[View Sellers Feedback]</A></font></TR></TD>

Being a newbie I am not sure what to use for the package? $seller= didnt work neither.

Thank You for your Wisdom and time to help me !

Replies are listed 'Best First'.
Re: adding $ENV script to HTML
by davido (Cardinal) on Oct 31, 2003 at 02:01 UTC
    If your script uses CGI.pm (many well-written CGI scripts do) you can use the $q->url() method to get the script's actual URL in any number of formats (relative, full, etc.).

    The $q->self_url() method will even generate a self-referencing URL that will maintain state.


    Dave


    "If I had my life to live over again, I'd be a plumber." -- Albert Einstein
Re: adding $ENV script to HTML
by tilly (Archbishop) on Oct 31, 2003 at 01:00 UTC
    What is $sellerfeed supposed to have in it?

    The complaint that you are getting from Perl is strict.pm catching the fact that you are trying to use a variable that isn't declared in any way. Somewhere prior to the html you have in the code you need to declare that variable and populate it.