Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Use Mkdir to create dir from list

by Tux (Abbot)
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

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 <>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977337]
[stevieb]: perldigious You should start by writing some unit tests. That'll ensure current functionality doesn't break with changes.
[choroba]: unit tests++
[choroba]: The only problem you can't solve by adding more tests is the problem of having too many tests.
[stevieb]: choroba Been there, done that :) Better too many than not enough though!
[stevieb]: I very often write a base set of unit tests before writing any code. It helps dictate the API, and ensures my earliest of ideas stay on track.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-07-21 20:00 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (335 votes). Check out past polls.