+ 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.
In reply to Re: Problem with assignment for class...
by BazB
in thread Problem with assignment for class...
by MTXperience
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |