|
I'm having trouble with get and post data in perl. Previously I was extracting arguments using the CGI module, as in $cgi->param($key). That was working fine with just get arguments, but I found out that if I had both post and get arguments it would only find the post args. So I did some research and made a function that did it manually, but I ran into a problem with getting post data. All the information I found said to use read(STDIN, $request, $ENV{'CONTENT_LENGTH'}), but it fails every time. So I guess I have three questions. Is there any way to get the CGI module to fetch both get and post arguments? And if not, what's wrong the method I'm using to extract post data manually? Lastly, will I even be able to grab both get and post data this way? I was assuming I'd be able to concatenate the post and get data and then process them normally.
|
# ¿ Mar 20, 2009 21:38 |
|
|
# ¿ May 7, 2024 00:06 |
|
Land Mime posted:http://perldoc.perl.org/CGI.html#MIXING-POST-AND-URL-PARAMETERS Thanks
|
# ¿ Mar 21, 2009 00:17 |
|
One more question - I've got the GD module installed so I can do some work with image files. It works fine except for jpeg support, which I've been trying to get working all day with no luck, it's driving me crazy. It seems gdlib won't install with jpeg support. I've installed jpeg6b properly, and when I run configure for gdlib it seems to recognize this: quote:** Configuration summary for gd 2.0.34: Before I installed jpeg6b it had said no for jpeg support, so it seems to have found the new libraries. Then I do make and make install, which seem to work fine, but gdlib-config still tells me it has no jpeg support, and I get no jpeg support in perl after reinstalling GD. Any ideas?
|
# ¿ Mar 28, 2009 03:41 |
|
What's the most efficient way to do multiple substitutions at once? There's lots of information online about doing multiple matches at once, but I can't find anything about substitutions. For example, is it possible to do something like this: code:
|
# ¿ Apr 20, 2009 02:28 |
|
Thanks for the replies, seems to work well.Triple Tech posted:Does it really matter? I would think so, I mean if you have a large number of substitutions to be made in a lengthy piece of text, it seems pretty inefficient and silly to go through the entire text for each individual substitution.
|
# ¿ Apr 20, 2009 04:27 |