in reply to glob: where are the full paths?

It gives *qualified* paths — not necessarily fully qualified paths — assuming you're getting it to returns paths at all. For example, glob '{a,b}{c,d}' doesn't returns paths at all.

Replies are listed 'Best First'.
Re^2: glob: where are the full paths?
by 7stud (Deacon) on Nov 14, 2009 at 10:00 UTC

    For example, glob '{a,b}{c,d}' doesn't returns paths at all.

    use strict; use warnings; use 5.010; say glob '{a,b}{c,d}'; --output:-- acadbcbd

    Uhm, where's the documentation for that?

    Ok, here's part of it:

    In list context, returns a (possibly empty) list of filename expansions on the value of EXPR such as the standard Unix shell /bin/csh would do. In scalar context, glob iterates through such filename expansions, returning undef when the list is exhausted.
    What do the curly braces do?
      Its in the manual , See File::Glob for details.
      The metanotation a{b,c,d}e is a shorthand for abe ace ade . Left to right order is preserved, with results of matches being sorted separately at a low level to preserve this order. As a special case {, }, and {} are passed undisturbed.
      $ perl -le"print for glob shift" "abe ace ade" abe ace ade $ perl -le"print for glob shift" "see also sea shore " see also sea shore $