Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Having to specify $_

by pg (Canon)
on Dec 09, 2002 at 06:11 UTC ( #218456=note: print w/replies, xml ) Need Help??

in reply to Having to specify $_

  1. $_ is also called $ARG if you 'use English;', what does the three letters 'ARG' mean? It means there are certain functions/operations, if you omit the arg, Perl will take $ARG as the default arg. In perlvar/$_, there is a complete list on this.

  2. $_ is also the place to store values, under specified situations. One example is, as stated in perlvar/$_:

    "The default place to put an input record when a <FH> operation's result is tested by itself as the sole criterion of a while test. Outside a while test, this will not happen."
Simple, that's it. Document, and again document. Perl does deliver what perlvar promised, but not those it never promised.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-09-27 05:55 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (118 votes). Check out past polls.