> Is there a better regexp than \$(\w+) to identify anything that
> the perl parser would identify as a variable?

This seems to be the crux of whether you feel comfortable
using s/// rather than something else.

Unfortunately, I don't know the answer with complete and
absolute certainty.

\w is defined as anything that is a perl identifier.

But it won't see special variables, like $@, and such.

But I don't think you have to worry about that for method names
or subroutine names or whatever. I think they'll always be \w+

There's screwy variable names in perl, but I can't think
of any screwy subroutine or method names.

So, I *think* you'll be safe.

Greg



_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to