good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Best way to generate URLs in CGI script?by bikeNomad (Priest) |
on Jul 27, 2001 at 05:46 UTC ( [id://100201]=perlquestion: print w/replies, xml ) | Need Help?? |
bikeNomad has asked for the wisdom of the Perl Monks concerning the following question:
I just started my first CGI script. Everything was working OK until I came to the part where I had to generate a reference to different CGI (in this case, graph?channel=1&xsize=400&ysize=300 Well, I said, there's this huge (6500 line+) CGI.pm; it must be good for something. So I tried constructing a new CGI object to generate the escaped URL and couldn't find any way to express a different URL (I could change its parameters, but not its address). Hmm... I found the URI module, and it looks like it'll do the job. But isn't there a clever way to take a base address and a bunch of name=value parameters and come up with a URL within the massive CGI.pm module? I realize I could roll my own with url_escape etc, but this has got to be something that's pretty common. What do you do?
Back to
Seekers of Perl Wisdom
|
|