Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl Style: About error messges opening files

by Abigail-II (Bishop)
on Apr 27, 2004 at 14:21 UTC ( [id://348498]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Perl Style: About error messges opening files
in thread Perl Style: About error messges opening files

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Perl Style: About error messges opening files

Replies are listed 'Best First'.
Re: Re: Perl Style: About error messges opening files
by flyingmoose (Priest) on Apr 27, 2004 at 14:31 UTC
    Of course not... just saying that errno varies with each C function and a PITA to translate, so that is why perror() exists. "$!" is already nicely doing the work for us, hence no need for a Perl perror.

    From perldoc POSIX:

    perror This is identical to the C function "perror()", which outp +uts to the standard error stream the specified message followed b +y ": " and the current error string. Use the "warn()" function an +d the "$!" variable instead, see the warn entry in the perlfunc manpage and the section on "$ERRNO" in the perlvar manpage +.

    You said you were new to perror, so I'm just explaining why it exists in C.

      You said you were new to perror, so I'm just explaining why it exists in C.
      Care to point out where I said I was new to perror? I'm not new to it, and I scrolling back in the thread, I can't find where I erroneously said I did.

      Abigail

        quote:
        I've been writing some C lately, and I've started appreciating perror.
          A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found