John W. Krahn wrote: > Dr.Ruud wrote: >> The '.' and '..' are directories, not plain files. > > Some file systems do not have the directories '.' and '..' so they *could* > just be plain files. > > >> You can write >> >> !/^\.$|^\.\.$/ >> >> as >> >> !/^\.\.?$/ >> >> so also as >> >> !/^[.][.]?$/ > > Until Perl 5.8.10 comes along literals are more efficient than character > classes so the first one would be better. > > > > John
I had tried this /^[.]$|^[..]$/ but had been getting errors about Posix. I'm not at the same system or even same OS now so I can't reproduce though. -- Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>