hi rkabhi
sitecustomize.pl is a special perl file that MAY be run before any other code (even BEGIN blocks). If it will be used is determined via compile time switches for the perl executable (-Dusesitecustomize).
If enabled it would be found at "$Config{sitelib}/sitecustomize.pl". The following code displays the settings.
on my windows boxuse strict; use warnings; use Config; print 'Version :'.$]."\n"; my $versionstr=`perl -v`; my $header='perl -v :'; for my $line (split ("\n",$versionstr)) { print $header.$line."\n";; $header=' :'; } print 'sitelib :'.$Config{sitelib}."\n"; print 'sitelibexp :'.$Config{sitelibexp}."\n"; print 'usesitecustomize:'.($Config{usesitecustomize}?$Config{usesitecu +stomize}:'')."\n";
on my lubuntu 14.04.5Version :5.020001 perl -v : :This is perl 5, version 20, subversion 1 (v5.20.1) bu +ilt for MSWin32-x86-multi-thread-64int :(with 1 registered patch, see perl -V for more detail +) : :Copyright 1987-2014, Larry Wall : :Binary build 2000 [298557] provided by ActiveState ht +tp://www.ActiveState.com :Built Oct 15 2014 22:10:49 : :Perl may be copied only under the terms of either the + Artistic License or the :GNU General Public License, which may be found in the + Perl 5 source kit. : :Complete documentation for Perl, including FAQ lists, + should be found on :this system using "man perl" or "perldoc perl". If y +ou have access to the :Internet, point your browser at http://www.perl.org/, + the Perl Home Page. sitelib :C:\Perl\site\lib sitelibexp :C:\Perl\site\lib usesitecustomize:define
on my lxle 12.04.5Version :5.018002 perl -v : :This is perl 5, version 18, subversion 2 (v5.18.2) bu +ilt for i686-linux-gnu-thread-multi-64int :(with 44 registered patches, see perl -V for more det +ail) : :Copyright 1987-2013, Larry Wall : :Perl may be copied only under the terms of either the + Artistic License or the :GNU General Public License, which may be found in the + Perl 5 source kit. : :Complete documentation for Perl, including FAQ lists, + should be found on :this system using "man perl" or "perldoc perl". If y +ou have access to the :Internet, point your browser at http://www.perl.org/, + the Perl Home Page. sitelib :/usr/local/share/perl/5.18.2 sitelibexp :/usr/local/share/perl/5.18.2 usesitecustomize:
So activestate enabled it while the ubuntu variants didnt.Version :5.014002 perl -v : :This is perl 5, version 14, subversion 2 (v5.14.2) bu +ilt for i686-linux-gnu-thread-multi-64int :(with 60 registered patches, see perl -V for more det +ail) : :Copyright 1987-2011, Larry Wall : :Perl may be copied only under the terms of either the + Artistic License or the :GNU General Public License, which may be found in the + Perl 5 source kit. : :Complete documentation for Perl, including FAQ lists, + should be found on :this system using "man perl" or "perldoc perl". If y +ou have access to the :Internet, point your browser at http://www.perl.org/, + the Perl Home Page. sitelib :/usr/local/share/perl/5.14.2 sitelibexp :/usr/local/share/perl/5.14.2 usesitecustomize:
it was Eily that first mentioned the use of these two global variables at Re: Platform Dependence observed in Perl - Hash keys have different format. All i did was to test to see that setting them in sitecustomize.pl (run before "use Data::Dumper;" was seen in the main perl program) would work.
Being main symbol table variables they are like other variables and need the $ to be used as Eily's examples showed. so the code to test them would be
print "\nUseqq = " . $Data::Dumper::Useqq . "\n";\ print "\nQuotekeys = " . $Data::Dumper::Quotekeys . "\n";
In reply to Re^5: Platform Dependence observed in Perl - Hash keys have different format
by huck
in thread Platform Dependence observed in Perl - Hash keys have different format
by rkabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |