But whenever I get my results returned by glob like this, they are broken up into different array elements by the spaces in the directories. So for instance:

@SEARCH_FOR_TIFS = glob("$FOLDERNAME*.tif"); print $SEARCH_FOR_TIFS[0];
Return
Element 0: /local/Macintosh/COVERS Element 1: archive/A-E/Eye Element 2: of Element 3: Element 4:

And part of the data disappears (element 3 and 4 should not be empty if it was splitting on the white space).

What am I doing wrong here? I looked through File::Glob but don't see how to change globs behavior. I see the arguments to glob will be interpreted as different search queries if separated by white space but that is not applicable here. This wasn't a problem when I was store the glob results in scalar, but that obviously wasn't the right strategy either since I was only getting one of the results.


In reply to Re^2: trouble with glob by kurt2439
in thread trouble with glob by kurt2439

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.