Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Use Mkdir to create dir from list

by Tux (Monsignor)
on Jun 20, 2012 at 13:25 UTC ( #977337=note: print w/ replies, xml ) Need Help??


in reply to Re: Use Mkdir to create dir from list
in thread Use Mkdir to create dir from list

Huh? chomp does NOT return $_! You will need map { chomp; $_ }

$ perl -MDP -E'@_=map{$_."\n"}1..5;DDumper[@_]' [ '1 ', '2 ', '3 ', '4 ', '5 ' ] $ perl -MDP -E'@_=map{$_."\n"}1..5;DDumper[map{chomp}@_]' [ 1, 1, 1, 1, 1 ] $ perl -MDP -E'@_=map{$_."\n"}1..5;DDumper[map{chomp;$_}@_]' [ 1, 2, 3, 4, 5 ]

Enjoy, Have FUN! H.Merijn


Comment on Re^2: Use Mkdir to create dir from list
Select or Download Code
Replies are listed 'Best First'.
Re^3: Use Mkdir to create dir from list
by rovf (Priest) on Jun 21, 2012 at 09:22 UTC
    Of course you are right! Silly mistake, thanks for pointing it out. I will update my node.


    -- 
    Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2015-07-28 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (255 votes), past polls