Dear all, I'm enhancing the Google-script, and would love to get an OUTPUT like this:
http://www.google.com/search?q=leuk&as_qdr=m3 How do I get the FIXED value &as_qdr=m3 after the VARIABLE q? I don't need a Prefix now, but a suffix. How do I enter this in Perl? Here's the script so far: use strict; use CGI qw/:standard/; use URI::Escape; use CGI::Carp qw/fatalsToBrowser/; # if we came from the form, grab the values and create the URL if ( param ) { # get the form data # see perldoc CGI my $_prefix = param( 'prefix' ) || ''; my $_search = param( 'search' ) || ''; # untaint it # see perldoc perlsec my ( $prefix ) = ( $_prefix =~ /^([a-zA-Z\d\s_:]+)$/ ); #create appropriate regex my ( $search ) = ( $_search =~ /^([a-zA-Z\d\s_:]+)$/ ); #create appropriate regex # escape characters with special meaning in URIs # see perldoc URI::Escape $prefix = uri_escape( $prefix ); $search = uri_escape( $search ); print redirect( "http://www.google.com/search?q=$prefix%20$search" ); } # otherwise, print the Web page else { print header; print <<END_HTML; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Test page</title> </head> <body> <form action="spriet.pl" method="get"> <input type="checkbox" name="prefix" value="allintitle:" /> All in title<br /> <input type="text" name="search" /> <input type="submit" name="Submit" /> </form> </body> </html> END_HTML } I w -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]