Randal L. Schwartz wrote:
"Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
Rob> my @new = grep /[^.]/, readdir DIR;
This is still the wrong regex. While it's narrow enough for windows, it will
*break* on Unix. No reason not to do the right thing here:
grep { $_ ne "." and $_ ne ".." } readdir DIR;
Rob, I'm surprised you still posted this even after our private email
exchange. You were *told* in email that this regex is broken.
Therefore, I will warn others to please discount Rob's postings in the future,
[...]
Not quite. Rob's program works for rational input data. I'm on *nux, and
I consider a filename of only periods to be invalid. All that's needed
is a comment in the code that warns people that files consisting of only
periods, including '...', are excluded.
Your attack on Rob is uncalled-for.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>