Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Now, I don't even know if this is a proper SoPW since I understand that, to put it simply, "something strange happens with these strangely named functions, even if the docs say that they apart that detail they're not different from any other unary operator..."
Since you cannot override operators (although you can overload certain operations - but said overload magic hangs off the operand, not the operator itself), it isn't surprising you cannot override -e. Note also that the error message you get you also get if you replace '-e' with '+', 'cmp', 'feeble' or any other non-function.

Here's another way to see -e isn't a function:

perl -wce '&-e' Bareword found where operator expected at -e line 1, near "&-e" (Missing operator before e?) syntax error at -e line 1, next token ??? -e had compilation errors.
It wouldn't be a syntax error if -e was a function.

Note also that perlfunc says they are operators:

       -X FILEHANDLE
       -X EXPR
       -X DIRHANDLE
       -X      A file test, where X is one of the letters listed below.  This
               unary operator takes one argument, either a filename, a
               filehandle, or a dirhandle, and tests the associated file to
               see if something is true about it.

In reply to Re: Previously unseen error in connection with -X functions by JavaFan
in thread Previously unseen error in connection with -X functions by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-25 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found