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

Re: How to find code written by smart people

by jplindstrom (Monsignor)
on Aug 21, 2006 at 16:46 UTC ( #568609=note: print w/ replies, xml ) Need Help??


in reply to How to find code written by smart people

Personally I like to do it like this1:

use File::Path; mkpath($dir); -d $dir or die("Could not create ($dir)\n");

It depends a little on what we're really after here but in my experience it's generally not very interesting whether the directory could be created or not. What's interesting is that it's there so we can do stuff with it.

So that's what we test for.

/J

1) Encapsulated into ensure_dir($dir).


Comment on Re: How to find code written by smart people
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-07-31 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls