Thanks for the note on the File::Path. I meant for this to be a quick throwaway script, and knew that the Cygwin mkdir could do this pretty easily. If I had planned for something any more long term than throwaway I would have looked for a solution better suited to re-use. But nice to know what to look for, anyway.

I did change the script to output the line before the split, and the file and path after. The output is getting long:

LINE: ===filename1 some/file/path=== FILE: ===filename1=== PATH: ===some/file/path=== Made C:/Documents/perl/some/file/path Moved C:/Documents/perl/filename1.xls to C:/Documents/perl/some/file/p +ath LINE: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 2. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 2. FILE: ====== PATH: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 17, <DATA> line 2. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 23, <DATA> line 2. Filename is blank, filepath is [], line is [] LINE: ===filename2 some/other/file/path=== FILE: ===filename2=== PATH: ===some/other/file/path=== Made C:/Documents/perl/some/other/file/path Moved C:/Documents/perl/filename2.xls to C:/Documents/perl/some/other/ +file/path LINE: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 4. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 4. FILE: ====== PATH: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 17, <DATA> line 4. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 23, <DATA> line 4. Filename is blank, filepath is [], line is [] LINE: ===filename3 yet/another/file/path/oooh/this/one/is/long=== FILE: ===filename3=== PATH: ===yet/another/file/path/oooh/this/one/is/long=== Made C:/Documents/perl/yet/another/file/path/oooh/this/one/is/long Moved C:/Documents/perl/filename3.xls to C:/Documents/perl/yet/another +/file/path/oooh/this/one/is/long LINE: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 6. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 15, <DATA> line 6. FILE: ====== PATH: ====== Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 17, <DATA> line 6. Use of uninitialized value in concatenation (.) or string at C:\Docume +nts\perl\try.pl line 23, <DATA> line 6. Filename is blank, filepath is [], line is []
And no apparent answer jumps at me. Another good suggestion, though, and one I hadn't tried.

In reply to Re^2: odd behavior with DATA section by Nkuvu
in thread odd behavior with DATA section by Nkuvu

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.