in reply to Re: Re: Problem with assignment for class...
in thread Problem with assignment for class...
"+" is a quantifier. It makes no sense as the only thing in a regexp. It has to modify something. Finding a nonsensical syntax within a regular expression will cause an error, because regular expressions are a built-in part of Perl.
If you want to match the literal character "+" you can do so by escaping it, or by metaquoting it:
s/\+/ / # or s/\Q+\E/ /
But you really shouldn't be parsing your own CGI parameters. Use the CGI.pm module, at least until you understand why this advice is important.
As for additional reading: The CGI.pm POD. And perlretut, and perlre, and perlrequick all provide good reading material on regular expressions, each targeting a different stage in your learning curve.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Problem with assignment for class...
by MTXperience (Initiate) on Oct 05, 2003 at 02:30 UTC | |
by Anonymous Monk on Oct 05, 2003 at 04:35 UTC |