in reply to Re: Re: Perl's Bad Ideas
in thread Perl's Bad Ideas

Says belg4mit:
6. [ <> globbing was a bad idea ] Why? Implementation, or too much for one operator?
Too much semantics on one piece of notation. If Larry hadn't unnecessarily overloaded <> to do globbing, then you would be able to write
@array_of_fhs = ...; my $line = <$array_of_fhs[37]>;
Which you can't presently do, and which frequently trips people up. Without the glob overloading, this would have meant just what it appears to.

--
Mark Dominus
Perl Paraphernalia

Replies are listed 'Best First'.
Re: Re: Perl's Bad Ideas
by belg4mit (Prior) on Apr 07, 2002 at 01:10 UTC
    >Too much semantics on one piece of notation. If Larry hadn't unnecessarily overloaded <> >to do globbing, then you would be able to write
    That's what I said, or rather asked if that was why clintp disliked it.

    As for the catch, yes. I have had to resort to readline before because of that.

    --
    perl -pe "s/\b;([st])/'\1/mg"

      That's exactly why I dislike it. I think I really started to dislike it the first time I had to teach filehandles and noted that...oh yeah, the thing in <>'s has to look *exactly* like <identifier> or <$identifier> or what happens is something else entirely. Ugh.