On Nov 18, 6:34 pm, jwkr...@shaw.ca (John W. Krahn) wrote: > David Christensen wrote: > > beginners: > > Hello, > > > Is unlink() supposed to provide an error message on failure? > > Yes. All Perl functions that interact with the underlying system will > set $! on failure. ($! is the same as errno in C.) >
Just thinking aloud (JTA?), there's a little verbosity gap in the docs at times. For example, compare 'mkdir' and 'unlink docs: mkdir Creates the directory specified by FILENAME, with permissions specified by MASK (as modified by "umask"). If it succeeds it returns true, otherwise it returns false and sets $! (errno). etc... unlink Deletes a list of files. Returns the number of files successfully deleted. etc... JTA again, why not add "or returns false and sets $! (errno)." to the sentence above. Surely any perlfunc doc bloat would be trumped by the added clarity. -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/