Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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]
[marto]: hopefully everyone had a good weekend
[Discipulus]: yees.. masonry, shaving of the ceiling (dunno if shaving is the right term..) 20hours in the weekend.. so veery good ;=)
[LanX]: yes I worked ...
[LanX]: ... and hope to get a free work day in compensation. :)
choroba went to a museum with the older children. The exhibition was called "American Indians".
[Discipulus]: this and...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-02-19 10:22 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (261 votes). Check out past polls.