in reply to Re: Bizarre usage of <>
in thread Bizarre usage of <>

@foo interpolated (which happens in the glob operator)

But glob() can't take an array, AFAIK. It just takes a single expression. For instance glob(@foo) turns the @foo into "8", just as doing glob(scalar(@foo)).

So is the above a known extension to glob() when using <> (everything I'd seen just talked about <> being a shortcut, not having extra features).

Even 5.8.0's File::Glob doesn't mention anything about being able to do shell argument expansion. And passing the list to bsd_glob() just takes the first argument. It's almost like it is doing a (join " ", @foo) somewhere.

--
James Antill

Replies are listed 'Best First'.
Re: Bizarre usage of <>
by Abigail-II (Bishop) on Nov 06, 2003 at 12:27 UTC
    But the glob function isn't used here. It's all about the glob operator. The fish hooks are quoting constructs, just like double quotes or slashes. And hence, variables, be them scalars or arrays get interpolated.

    It's like doing glob "@foo".

    Abigail

      Ahh, I see, the fish hooks are implicitly converting the argument to a string. Ie. changing $" changes what happens. Thanks.

      --
      James Antill