in reply to Specaila characters string not coming in final output file
Way too long.
If you're having trouble with usernames, trim it down to just that fragment. Throw that fragment into a test.pl, and print to see what it is doing with explicit inputs.
I did notice that you are removing only whitespace from the username. Specifically, you are not removing quote characters from the name.
Consider what happens if $User_Name = " joe's name here ";Then, your
Results in 'joe's name here' which has mismatched quotes.$User_Name= "'" . $User_Name . "'";
In general, do not filter out bad characters. Instead, only allow good characters. That way if you miss one, you're not hosed.
might be a better choice, or simply s/\D//g; if you want only numbers.$User_Name =~ s/[^a-zA-Z0-9]//g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Special characters string not coming in final output file
by namishtiwari (Acolyte) on Aug 07, 2009 at 15:24 UTC | |
by BioLion (Curate) on Aug 07, 2009 at 15:48 UTC | |
by namishtiwari (Acolyte) on Aug 07, 2009 at 16:14 UTC | |
by namishtiwari (Acolyte) on Aug 10, 2009 at 11:01 UTC |