in reply to Problem with assignment for class...
+ is a metacharacter (more accurately a quantifier) - read perldoc perlre for a full list.$value =~ s/+/\ $1/g;
Update: Mmmm. Perhaps that wasn't completely helpful.
The error message you're getting is pretty informative as far as error messages go.
The + is making the substitution/regex expect one or more of whatever character preceeds it.
In this case, there is no proceeding character, so perl complains.
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problem with assignment for class...
by MTXperience (Initiate) on Oct 04, 2003 at 21:38 UTC | |
by davido (Cardinal) on Oct 04, 2003 at 21:46 UTC | |
by MTXperience (Initiate) on Oct 05, 2003 at 02:30 UTC | |
by Anonymous Monk on Oct 05, 2003 at 04:35 UTC |