in reply to Re^3: Delete files with Perl in Windows
in thread Delete files with Perl in Windows
The wildcards in glob() are system-specific; SQL parameter value quoting characters are different from that, and the metacharacters in perl formats, POD and string interpolation are also mini-languages unto themselves. Even for other regex engines, this decision does not hold. How to "escape" these characters also differs between each standard. You escape regex with backslash, sql with arcane quotemarks (or placeholders), format/POD with blank lines or comment marks or tricks with curly braces.
It just so happens that for perl 5 regex, anything that's not a letter or digit might be considered a metacharacter, and could need escaping. The quotemeta() function for perl 5 thus escapes non-letter, non-digit characters, whether they are actually regex special or not. In deciding regex syntax, it was deemed simpler to remember what should be escaped this way. That's likely not what is required for SQL, POD or other usage patterns.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Delete files with Perl in Windows
by ikegami (Patriarch) on Nov 30, 2007 at 19:52 UTC |