in reply to Isn't glob annoying? (somehow)

perldoc -f glob says:
glob EXPR glob Returns the value of EXPR with filename expansions such as + the standard Unix shell /bin/csh would do. This is the interna +l function implementing the "<*.c>" operator, but you can us +e it directly. If EXPR is omitted, "$_" is used. The "<*.c>" op +erator is discussed in more detail in the section on "I/O Operato +rs" in the perlop manpage. ....
As shell expansion, this does what it promises. Here is an example excerpt from my /bin/sh on cygwin:
$ echo * Desktop Mail _viminfo building-gcc-for-mips.txt car.pic gcc gdbtk.ini +kbuildsycoca.exe.stackdump kikbd.exe.stackdump parrot pwin32 x0 x1 xx Administrator@RTC ~ $ echo *jd *jd Administrator@RTC ~ $ echo dwq dwq

Courage, the Cowardly Dog.

Replies are listed 'Best First'.
Re: Re: Isn't glob annoying? (somehow)
by PetaMem (Priest) on Aug 02, 2002 at 09:02 UTC
    First off, my camel book has a slightly different text ("such as a shell would do"), and if I look at your results, then this
    $ echo *jd *jd
    contradicts the behaviour in @t3 in my example.

    Bye
     PetaMem

      It's a BSD glob. The original BSD shell is the csh, not the Bourne shell or some derivate of that.
      $ ls *1 *1 not found $ csh % ls *1 No match. % exit $
      Abigail
      I also noticed that it contradicts to @t3 example, but command next to it explains glob('1') behaviour.

      And yes, I agree that glob's behaviour is somewhat tricky, or even more to say, weird.

      Courage, the Cowardly Dog.