Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Having to specify $_

by pg (Canon)
on Dec 09, 2002 at 06:11 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found