Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Use Mkdir to create dir from list

by aaron_baugher (Deacon)
on Jun 22, 2012 at 16:13 UTC ( #977872=note: print w/ replies, xml ) Need Help??


in reply to Use Mkdir to create dir from list

Look at the first two lines below, taken from your code. The first reads all the lines from the file pointed to by $GSR_fh into the array @thefiles. The second reads all the lines from the file pointed to by $GSR_fh, chomps them, and passes the chomped values to make_path. But there aren't any lines in the file to read at this point, because they were all read by the first line. Either remove the first line or use the array in your second line, as in the third line below.

my @thefiles = <$GSR_fh>; make_path ( map {chomp; $_} <$GSR_fh>); make_path ( map {chomp; $_} @thefiles );

Aaron B.
Available for small or large Perl jobs; see my home node.


Comment on Re: Use Mkdir to create dir from list
Select or Download Code
Re^2: Use Mkdir to create dir from list
by GregorySRobinson (Initiate) on Jun 23, 2012 at 04:37 UTC
    Thanks for the explanation - Makes sense. Lots of joy hitting execute and seeing those directories appear!!! Now on to next step. Append directory string (scaler in Perl) to the directory being created.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2014-07-29 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls