in reply to encoding URL ampersands?

most of the perl cgi modules (including the perl module named CGI) provide url parameter getter and setter functions that take care of encoding etc, so you don't need to re-invent the wheel--unless you really do need to. example
use CGI qw(:standard); if(param()) { if($a=param('a')) { /* code for url parameter a */ } } else { /* generate html form when not called with parameters */ /* the form submit url points to itself (the .pl) */ }
The first if checks that there are parameters present, which is very handy as you can attach code to the else for this if, to generate a form. In other words, the same perl script processes form/url parameters and data submitted OR generates a html form to fill in.
the hardest line to type correctly is: stty erase ^H