NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Re: Line Noise (Score:1)
It’s not Perl that’s line noise, it’s the regex syntax. Last night I wrote this:
s{/(?!\.\.)[^/]+/+\.\.(?=/|\z)}{}gRe: Line Noise (Score:2)
So it cleans up pathnames to remove
/foo/../bar/../bazto be juRe: Line Noise (Score:1)
Even
/xonly really helps because of your profuse comments, though.You guessed correctly: I needed to normalize HTTP URIs to compare them, and URI [cpan.org]’s
canonicalmethod doesn’t finish the job. To be precise, this runs in a1 while s///loop, which is necessary to handle paths likefoo/bar/baz/quux/../../../bar.Re: Line Noise (Score:2)
-Dom
Reply to This
Parent