use round brackets around your if statement.No. Not needed.
without the brackets it's probably testing (if $name),That doesn't make any sense.
and there's nothing to bind the substitution to...And neither does that.
Please, when answering a question, don't make wild guesses that can easily be verified (run it through -c -MO=Deparse, and you'll see you're not making any sense). Giving bad answers actually decreases the value of Perlmonks. Running the code through -c -MO=Deparse would have taken less time than typing in the answer - and hence would have saved you time. Would have saved me time as well.
In reply to Re^2: regex problem
by JavaFan
in thread regex problem
by pinnacle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |