Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's %^H used for in Perl?

Tags:

perl

Anyone knows what this global variable does?

I can't find any information by google because of the special characters .

UPDATE

[root@dev-test v2]$ perldoc -v '%^H'
Ending switch processing.  Args are [%^H] with 0 errors.
/usr/bin/perldoc => Pod::Perldoc v3.14

Formatter class Pod::Perldoc::ToMan successfully loaded!
Will format with the class Pod::Perldoc::ToMan
Searching for %^H
Looking for %^H in /usr/bin /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /usr/kerberos/bin /usr/lib64/ccache /usr/local/bin /bin /usr/bin
No documentation found for "%^H".
like image 464
new_perl Avatar asked Jul 26 '11 02:07

new_perl


1 Answers

From http://perldoc.perl.org/perlvar.html:

%^H
The %^H hash provides the same scoping semantic as $^H. This makes it useful for implementation of lexically scoped pragmas. See perlpragma.

This variable was added in Perl 5.6.

like image 191
Gabe Avatar answered Oct 05 '22 08:10

Gabe