in reply to Re: s/// in a sub : passing expressions
in thread s/// in a sub : passing expressions
eval is dangerous; Never use it with user input!Don't panic!
Also, parsing XML with regexes is bad,That is entirely dependent on the problem. For long-lasting tools and/or tools that have to parse XML from a variety of sources, that is true. For one-offs or scripts dealing with generated XML (where the generator is well understood and unlikely to change) it probably is not.
.* is bad,That is ridiculous. (Regardless of Death to Dot Star!) It is another tool in the toolbox. Is .+ bad? Why doesn't anyone complain about it? I know .* is often used in places where it should not be, but that doesn't make it bad. People often use map in places where they shouldn't. That doesn't make it bad. People just need to be educated about when to use it and when to avoid it.
and $ doesn't do what you think,How do you know what he thinks?
Absolutism and assumptions, all of this. You are providing what amounts to cargo-cult advice. Some cargo-cult advice is mostly harmless (e.g. use strict;) but, in most cases, like code, advice should be tailored to the situation
Perl 6 changes:More like Perl 6 spam... Who asked? There will be plenty of opportunity for everyone to learn about Perl 6 when they need to. Eventually, this site will be filled with P6 questions. Would you please curb your enthusiasm and answer those questions only after someone asks them? Or perhaps just write a series of meditations; I'm sure they would be well-received.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: s/// in a sub : passing expressions
by Juerd (Abbot) on Oct 30, 2005 at 00:32 UTC | |
by Anonymous Monk on Oct 30, 2005 at 03:10 UTC |