mkdir eval try catch


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. use File::Path #core module
  2.  
  3. local $@;
  4. eval {mkpath('./foo')};
  5. if ($@) { die "failed to create dir $@\n";}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.