Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found