The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-14-2007
cbkihong cbkihong is offline
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,490
If you look at the error more carefully, it is generated by mkpath(), not yours.

From the File::Path manpage:

Quote:
If a system error prevents a directory from being created, then the mkpath function throws a fatal error with Carp::croak . This error can be trapped with an eval block:
As you don't trap the error with eval, the program terminates with the error as expected.
Reply With Quote