Mathew wrote: > John W. Krahn wrote: >>Dr.Ruud wrote: >> >>>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. > > 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.
The character classes [.] and [..] and [........] are all the same, duplicate characters are ignored. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
