Home > Archive > PERL Beginners > March 2006 > Whimsical Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Whimsical Question
|
|
| Ryan Frantz 2006-03-29, 7:57 am |
| Perlers,
I just got a copy of Intermediate Perl (the updated version of Learning
Perl Objects, References, and Modules, aka Alpaca) and started reading.
I've been coding Perl for about 18 months now and every time I see '$_'
I immediately understand its use in the context of the code, but I don't
know its name. I realized this after reading over example code in the
Alpaca and it got me to wondering: _Is_ there a name for '$_' ? For
example, when I see '#!', I read 'shebang' and it rolls off the tongue,
but 'dollar underscore' is clumsy. Does anyone know if a name exists?
If not, do any of you have pet name for it?
I know this is a whimsical (and possibly esoteric) question but I
figured it might generate some fun threads.
ry
| |
| Chad Perrin 2006-03-29, 6:57 pm |
| On Wed, Mar 29, 2006 at 08:03:24AM -0500, Ryan Frantz wrote:
> Perlers,
>
> I just got a copy of Intermediate Perl (the updated version of Learning
> Perl Objects, References, and Modules, aka Alpaca) and started reading.
> I've been coding Perl for about 18 months now and every time I see '$_'
> I immediately understand its use in the context of the code, but I don't
> know its name. I realized this after reading over example code in the
> Alpaca and it got me to wondering: _Is_ there a name for '$_' ? For
> example, when I see '#!', I read 'shebang' and it rolls off the tongue,
> but 'dollar underscore' is clumsy. Does anyone know if a name exists?
> If not, do any of you have pet name for it?
>
> I know this is a whimsical (and possibly esoteric) question but I
> figured it might generate some fun threads.
I tend to call it "implicit scalar".
--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
"A script is what you give the actors. A program
is what you give the audience." - Larry Wall
| |
| Juan Gomez 2006-03-29, 6:57 pm |
| =20
I am with Ryan been working with Perl for some months now
And I have never found a name for '$_', some of my friends=20
They just call it scalar but that's too general for it
If someone knows please tell
Thanks
Armando Gomez Guajardo=20
Process Engineer
Work Ph 956 547 6438=20
Beeper 956 768 4070
-----Original Message-----
From: Chad Perrin [mailto:perrin@apotheon.com]=20
Sent: Wednesday, March 29, 2006 7:47 AM
To: beginners@perl.org
Subject: Re: Whimsical Question
On Wed, Mar 29, 2006 at 08:03:24AM -0500, Ryan Frantz wrote:
> Perlers,
>=20
> I just got a copy of Intermediate Perl (the updated version of=20
> Learning Perl Objects, References, and Modules, aka Alpaca) and
started reading.
> I've been coding Perl for about 18 months now and every time I see
'$_'
> I immediately understand its use in the context of the code, but I=20
> don't know its name. I realized this after reading over example code=20
> in the Alpaca and it got me to wondering: _Is_ there a name for '$_' ?
> For example, when I see '#!', I read 'shebang' and it rolls off the=20
> tongue, but 'dollar underscore' is clumsy. Does anyone know if a name
exists?
> If not, do any of you have pet name for it?
>=20
> I know this is a whimsical (and possibly esoteric) question but I=20
> figured it might generate some fun threads.
I tend to call it "implicit scalar".
--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] "A script is
what you give the actors. A program is what you give the audience." -
Larry Wall
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional
commands, e-mail: beginners-help@perl.org <http://learn.perl.org/>
<http://learn.perl.org/first-response>
| |
| Steve Bertrand 2006-03-29, 6:57 pm |
|
[color=darkred]
>
> I tend to call it "implicit scalar".
How 'bout "impliscalar"?
Or "defariable" for default variable.
:)
Steve
| |
| Ryan Frantz 2006-03-29, 6:58 pm |
|
> -----Original Message-----
> From: Steve Bertrand [mailto:iaccounts@ibctech.ca]
> Sent: Wednesday, March 29, 2006 9:29 AM
> To: beginners@perl.org
> Subject: RE: Whimsical Question
>=20
>=20
the[color=darkred]
>=20
>=20
> How 'bout "impliscalar"?
>=20
> Or "defariable" for default variable.
Or, since Randal and Tom refer to it as "Perl's Favorite Default" in
Learning Perl what about 'perlfave'?
ry
>=20
> :)
>=20
> Steve
>=20
>=20
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>=20
| |
| Chas Owens 2006-03-29, 6:58 pm |
| On 3/29/06, Ryan Frantz <ryanfrantz@informed-llc.com> wrote:
> Perlers,
>
> I just got a copy of Intermediate Perl (the updated version of Learning
> Perl Objects, References, and Modules, aka Alpaca) and started reading.
> I've been coding Perl for about 18 months now and every time I see '$_'
> I immediately understand its use in the context of the code, but I don't
> know its name. I realized this after reading over example code in the
> Alpaca and it got me to wondering: _Is_ there a name for '$_' ? For
> example, when I see '#!', I read 'shebang' and it rolls off the tongue,
> but 'dollar underscore' is clumsy. Does anyone know if a name exists?
> If not, do any of you have pet name for it?
>
> I know this is a whimsical (and possibly esoteric) question but I
> figured it might generate some fun threads.
>
> ry
Well, "use english" calls it $ARG. I call it the-default-variable or
dollar-sign-underscore when talking.
| |
| Timothy Johnson 2006-03-29, 6:58 pm |
|
I sometimes call it the "magic variable".
-----Original Message-----
From: Ryan Frantz [mailto:ryanfrantz@informed-llc.com]=20
Sent: Wednesday, March 29, 2006 5:03 AM
To: beginners@perl.org
Subject: Whimsical Question
Perlers,
<snip>
I realized this after reading over example code in the
Alpaca and it got me to wondering: _Is_ there a name for '$_' ? For
example, when I see '#!', I read 'shebang' and it rolls off the tongue,
but 'dollar underscore' is clumsy. Does anyone know if a name exists?
If not, do any of you have pet name for it?
<snip>
| |
| usenet@DavidFilmer.com 2006-03-29, 6:58 pm |
| Ryan Frantz wrote:
> I've been coding Perl for about 18 months now and every time I see '$_'
> I immediately understand its use in the context of the code
I tend to avoid $_ these days, so I'm not confronted with the question
of what to call it.
If you get a copy of Damian Conway's "Perl Best Practices" (highly
recommended) you will see this bit of wisdom (bottom of page 105):
[color=darkred]
That's a good point. I can't really think of a good reason to ever use
$_ except that it saves the coder a few keystrokes. So, for production
code, I've adopted the practice of always using named lexical
variables, which improves readability and robustness.
But, FWIW, Damian calls the thing "dollar-underscore"
--
http://DavidFilmer.com
| |
| Bill Peters 2006-03-29, 6:58 pm |
| Not very imaginative, but I read in a perldoc somewhere that it's pronounced
"dollar-under." A little better than having the "score" on the end I guess.
-Bill
On 3/29/06, Timothy Johnson <tjohnson@zonelabs.com> wrote:
>
>
> I sometimes call it the "magic variable".
>
>
> -----Original Message-----
> From: Ryan Frantz [mailto:ryanfrantz@informed-llc.com]
> Sent: Wednesday, March 29, 2006 5:03 AM
> To: beginners@perl.org
> Subject: Whimsical Question
>
> Perlers,
>
> <snip>
>
> I realized this after reading over example code in the
> Alpaca and it got me to wondering: _Is_ there a name for '$_' ? For
> example, when I see '#!', I read 'shebang' and it rolls off the tongue,
> but 'dollar underscore' is clumsy. Does anyone know if a name exists?
> If not, do any of you have pet name for it?
>
> <snip>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
| |
| Rob Coops 2006-03-29, 6:58 pm |
| Lets just agree to keep on calling our little magic thingy...
On 3/29/06, Bill Peters <bill.peters@gmail.com> wrote:
>
> Not very imaginative, but I read in a perldoc somewhere that it's
> pronounced
> "dollar-under." A little better than having the "score" on the end I
> guess.
>
> -Bill
>
> On 3/29/06, Timothy Johnson <tjohnson@zonelabs.com> wrote:
>
>
| |
| Frank Bax 2006-03-29, 6:58 pm |
| At 08:03 AM 3/29/06, Ryan Frantz wrote:
> _Is_ there a name for '$_' ?
http://www.rexswain.com/perl5.html
$_ The default input and pattern-searching space.
| |
| Tom Phoenix 2006-03-29, 6:58 pm |
| On 3/29/06, Ryan Frantz <ryanfrantz@informed-llc.com> wrote:
> _Is_ there a name for '$_' ?
In class, I pronounce it "dollar-underscore". But that's short for
"dollar-underscore-perl's-favorite-default". :-)
--Tom Phoenix
Stonehenge Perl Training
| |
| pue@gmx.net 2006-03-29, 6:58 pm |
| Chas Owens schrieb:
> On 3/29/06, Ryan Frantz <ryanfrantz@informed-llc.com> wrote:
>
>
>
> Well, "use english" calls it $ARG. I call it the-default-variable or
> dollar-sign-underscore when talking.
perldoc perlvar calls it $ARG, too. I tend to even use that name, but I usually
pronounce it a little differently, more like:
'$AAAARRGGHHHHH, Magic ahead! watch out!'
SCNR,
Andreas Pürzer
|
|
|
|
|