develooper Front page | perl.fwp | Postings from March 2002

Re: Symbols in CORE?

Thread Previous | Thread Next
Rafael Garcia-Suarez
March 1, 2002 03:01
Re: Symbols in CORE?
Message ID:
F . Xavier Noria wrote in perl.fwp:
> Is there a way to list the symbols in the CORE package?

Symbols in the CORE "package" are (currently) the Perl keywords. E.g. :

    $ perl -le 'print 1 CORE::x 3'

    $ perl -le '$_=shift;CORE::y/a/b/;print' bar

Note that this is not documented.

To have the list of the perl keywords, a way to do it is to open the
file keywords.h that must be installed somewhere on your disk
(e.g. mine is at /usr/lib/perl5/5.6.0/i386-linux/CORE/keywords.h)
and parse it.

Have fun!

Rafael Garcia-Suarez / /
There's always something that's known to be painfully broken, for some
definitions of pain and broken. -- Jarkko Hietaniemi

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About