Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: simple chmod (better error messages)

by Aristotle (Chancellor)
on Dec 26, 2003 at 04:55 UTC ( [id://317039]=note: print w/replies, xml ) Need Help??


in reply to Re: simple chmod
in thread simple chmod

chmod $mod, $file or die "Couldn't chmod $file";
A good suggestion, but lacking. If you add just five or so characters you get something much more useful:
chmod $mod, $file or die "Couldn't chmod $file: $!\n";
That will probably reveal the reason for the chmod failure without requiring any further investigation.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: simple chmod
by TVSET (Chaplain) on Dec 26, 2003 at 08:06 UTC
    Actually, that is what I was writing, but didn't finish for some reason. :)
    I guess I need more sleep rather then more of these NOC shifts. :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-09-15 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.