the author of CGI.pm knew that people want to do exactly
what you're trying to do, so there's no need to do it yourself.
use CGI ();
my $q = new CGI;
open FILE, ">>testing123.text" or die $!; # error checking is importan
+t! always!
$q->save(FILE);
close FILE;
and you're done! no need to do that parsing and stuff
yourself.
if you really only want two specific form fields and your
own format, then please use the CGI::param method, as
it is working correctly and will decode the values for
you.
if you don't want to decode the values, then, please
provide more info like input data and output (rectangle
is not really a rectangle but it means an unprintable character.
use an editor to find out which character it is.)