Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Multiple Permutation handling

by Laurent_R (Canon)
on Mar 02, 2013 at 22:20 UTC ( #1021462=note: print w/replies, xml ) Need Help??

in reply to Re: Multiple Permutation handling
in thread Multiple Permutation handling

Hello dear Perl Monks,

On a cross-post of the same question by the OP on the DevShed forum, I answered with a suggestion almost identical to Toolic's nested foreach loops.

However, this use of the glob function puzzles me. After some tests and reading in detail the glob description, I found this passage: "If non-empty braces are the only wildcard characters used in the glob, no filenames are matched, but potentially many strings are returned. For example, this produces nine strings, one for each pairing of fruits and colors".

So, now I understand why glob is being used in this context, but can anyone tell me why glob is doing this sort of things, which seems to have little to do with the normal usage of glob (by "normal", I just mean the usage that I have been knowing for years, i.e. returning filename extensions or a list of filename matching a shell file pattern)?

Replies are listed 'Best First'.
Re^3: Multiple Permutation handling
by choroba (Bishop) on Mar 02, 2013 at 22:24 UTC
    In some shells, brace expansion is part of the filename patterns.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Thanks, I get the point now.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021462]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-10-24 01:10 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (127 votes). Check out past polls.