SPUG: scanning directories
Daniel Jacobs
danielj at cheshirecat.net
Fri Dec 1 00:05:25 CST 2000
Doh! Sorry, it was late and I was thinking Windows & backslashes. Brain
fart.
On Thu, 30 Nov 2000, Matt Tucker wrote:
> -- Daniel Jacobs <danielj at cheshirecat.net> spake thusly:
>
> > Do you possibly need to escape the '/' characters? i.e.
> >
> > $portal{BASEDIR} = "\/\/machinename\/sharedirectory";
>
> This would do absolutely nothing in Perl. Escaping forward slashes is
> never necessary unless you're using them as the separator character
> for regexes or quotes, in which case you should just pick a different
> separator.
>
> I really wish people would take the time to learn what does and
> doesn't need to be escaped in Perl. Excessive backslashes make code
> more difficult to read, and I've seen far too much gratuitous use of
> them. It's too bad, really, because Perl provides enough ways to avoid
> them (alternate quote characters, heredocs, \Q...\E, etc.) that
> they're hardly ever necessary for anything other than metacharacters.
>
Daniel Jacobs | danielj at cheshirecat.net | Internet & Unix Consulting
"In art and dream, may you proceed with abandon.
In life, may you proceed with balance and stealth." - Patti Smith
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list