Re: What is the global hash %_ ?



In article <RHUug.110583$I61.73488@clgrps13>,
"John W. Krahn" <someone@xxxxxxxxxxx> wrote:

ozarfreo@xxxxxxxxx wrote:
I've seen that %_ is treated as a special variable in Perl, as $_ and
@_ are: no warning is issued when using it without a package name, no
'my' is allowed on that var; the problem is that I could not find it
among Perl's documentation.

I'd like to use it in a program but am not sure whether I might be
interfering with some other intended use for %_ . Can someone point out
what is this variable exactly, and whether it is safe to use it?

If it is not listed in perlvar then perl doesn't care what you do with it.

It probably only comes along because it's in the same glob as $_ and @_,
oh and _ the special filehandle for stat.

Personally, if someone can come up with a syntax for the call, it'd make
a great place to put named function parameters.
--
boss, sometimes i think | kevin michael vail
that our friend mehitabel | kevin@xxxxxxxxxx
is a trifle too gay |
-- archy | wotthehell wotthehell
.



Relevant Pages

  • Re: What is the global hash %_ ?
    ... ozarfreo@xxxxxxxxx schreef: ... no warning is issued when using it without a package name, ... 'my' is allowed on that var; the problem is that I could not find it ...
    (comp.lang.perl.misc)
  • Re: What is the global hash %_ ?
    ... no warning is issued when using it without a package name, ... 'my' is allowed on that var; the problem is that I could not find it ... If it is not listed in perlvar then perl doesn't care what you do with it. ...
    (comp.lang.perl.misc)
  • Yum Problems, and Apt-Get Problems, Can Anyone help?
    ... .Package php-domxml needs libxsltbreakpoint.so.1, this is not available. ... am trying to install something. ... There are multiple versions of "autoconf213" in your system. ... you may remove that warning by setting the following ...
    (Fedora)
  • SUMMARY: Errors applying kernel patch 118833-36
    ... I was missing the 'SUNWmdb' package. ... 'patchadd', which I was not. ... However, once the package list is done, I see a worrisome message: ... | WARNING: sbd: unable to resolve dependency, ...
    (SunManagers)
  • Re: Ripple effect
    ... The syntax should have the imports INSIDE the package, ... generally not because of compiler warnings ... but all kinds of other unused things (use clauses, variables, etc). ... Don't all Ada compilers at least have a warning? ...
    (comp.lang.ada)