File::Util make_dir unwanted output

when using this sub, if I pass a directory with bad characters it spits its output to the console like this:

PROCESS TERMINATED DUE TO ERRORS

File::Util can't use this string for �the name of a directory�.
   �ddd??---?d�
It contains illegal characters.

Illegal characters are:
   \   (backslash)
   /   (forward slash)
   :   (colon)
   |   (pipe)
   *   (asterisk)
   ?   (question mark)
   "   (double quote)
   <   (less than)
   >   (greater than)
   \t  (tab)
   \ck (vertical tabulator)
   \r  (newline CR)
   \n  (newline LF)

Origin:     This is a human error.
Solution:   A human must remove the illegal characters from this string.

ARG   _pak = File::Util
ARG   purpose = the name of a directory
ARG   string = ddd??---?d

1. File::Util::_throw
    -called at line (1343) of blib/lib/File/Util.pm (autosplit into blib/lib/auto/File/Util/make_dir.al)
       -was called with args
       -was not called to evaluate anything


2. File::Util::make_dir
    -called at line (35) of importdatafiles.pl
       -was called with args
       -was not called to evaluate anything


3. (eval)
    -called at line (35) of importdatafiles.pl
       -was called without args
       -was not called to evaluate anything

How to suppress this output (I just want to print "Bad" without all this detailed info)

Answers


use File::Path qw/mkpath/? I don't know whether it runs under windows though, but it's worth a try.


Need Your Help

Use package file to write to Cloud Storage?

go

Golang provides the file package to access Cloud Storage.

Inheriting from an immutable types?

inheritance lua metatable

I just answered a Python question which "required" inheriting a class from int (immutable type in Python).

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.