I have been stuck here, SOS call:
Using CGI.pm, I have the script calling certain categories from mySQL table.
my $cat = $q->param('cat');
my $dbh -> prepare ("SELECT * FROM main WHERE CAT='$cat'");
Sample Categories('CAT') are given below:
PHP/Ad_Management/Classifieds
Perl_and_CGI/Ad_Management
C_and_C++/Ad_Management
etc.
Calling the categories starting with PHP and Perl didn't cause any issue, but
when I called the Categories
starting with C_and_C++, nothing was shown because CGI.pm was removing the
characters ++.
I replaced the All ++ in the mySQL database with ASCII ++, so now the
categories are in the DB are:
C_and_C++/Ad_Management
And now when I am calling the script:
http://mysite.com/cgi-bin/index.cgi?cat=C_and_C++/Ad_Management
Since CGI.pm removing ++, so in script I did this:
my $cat =~ s/C_and_C/C_and_C++/gi;
It should have extracted the results from DB containing C_and_C++, BUT NO.
it's printing and calling cat within script as "C_and_C++ /Ad_Managment"
Putting an extra Space after +, so mySQL failed to deliver matching
categories.
Why an extra white space? or anything more reasonable I can do to call cat with
"C++" from mySQL.
TIA.