Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Use Mkdir to create dir from list

by aaron_baugher (Curate)
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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977872]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-07-22 21:31 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (341 votes). Check out past polls.