printf("===%4s===\n\n" ,"DD"); gives you === DD=== printf("===%04s===\n\n","DD"); gives you ===00DD=== printf("===%-4s===\n\n","DD"); gives you ===DD === printf("===%4u===\n\n" ,"12"); gives you === 12=== printf("===%04u===\n\n","12"); gives you ===0012=== printf("===%-4u===\n\n","12"); gives you ===12 === =========================================================================== To insure output is actually written and committed to your output file instead of getting bufferred, after opening the file, try open (DUP, ">>$log_file") || die "Can't open the duplicate log: '$log_file'"; select(DUP); $| = 1; select(STDOUT); =========================================================================== You can use my ~/bin/qperlmodules program to tell you what Perl modules are installed, and the versions of each (if available). You can also see the Perl modules history by looking at the file /dfs/prod/perl/lib/perl5/5.6.1/aix/perllocal.pod =========================================================================== Package Install History on jasper. Date Package Name Version Source Notes, e.g. Needed For ========== ============ ======= ========== ============================== 01/04/2001 MIME-Base64 2.11 CPAN To play around with this stuff 01/04/2001 URI 1.09 CPAN 01/04/2001 HTML-Tagset 3.03 CPAN 01/04/2001 HTML-Parser 3.15 CPAN 01/04/2001 libnet 1.0703 CPAN Includes Net 01/04/2001 Digest-MD5 2.12 CPAN Includes Digest, MD5 01/04/2001 libwww-perl 5.49 CPAN Includes File, HTML, HTTP, LWP, WWW 01/04/2001 mod_perl 1.24 CPAN Includes Apache 11/13/2001 IO:Tty 0.05 CPAN To Automate JAPIO imag Updates 11/13/2001 IO:Stty .02 CPAN 11/13/2001 Expect 1.12 CPAN 01/24/2002 Perl 5.6.1 bull Bug with IBM's perl 5.005_03 =========================================================================== I was getting core files running IBM's version of Perl 5.005_03 even after I grabbed their latest service and upgraded my system to perl.rte 5.5.3.75, so I decided to grab the latest Perl from the Internet. Going first to http://www.cpan.org, and following the 'binary distributions ("ports")' link, the AIX section pointed me off to Groupe Bull at http://www.bull.de/pub, but since that's in Denmark, I went to the North American mirror site at http://www.rge.com/pub/systems/aix/bull The "quick description of the Top 20 utilities" had this to say about Perl. perl v5.6, PERL scripting language The Perl scripting language is rapidly becoming the preferred multi-purpose scripting language. Perl v5.5.3 is included as standard by IBM with AIX 4.3.3. However the IBM Perl package is not updated regularly. The freeware perl distribution is updated rapidly after perl releases, and is configured to interoperate with the the IBM packaging. Thus the freeware perl package can use modules installed under /usr/opt/perl5/lib/site_perl (the directory proposed by IBM) and under /usr/local/lib/perl5/site_perl. A few clicks later, I was downloading perl-5.6.1.0.exe from http://www.rge.com/pub/systems/aixbull/aix432/perl-5.6.1.0.exe, which put perl-5.6.1.0.exe in my home directory. chmod +x perl-5.6.1.0.exe perl-5.6.1.0.exe which inflates perl-5.6.1.0.bff and perl-5.6.1.0.bff.asc mv perl-5.6.1.0.exe /afs/d/software/base/perl_modules/Source p=/afs/d/software/base/perl_modules/Non-AIX-Standard_Builds/perl-5.6.1.0 mkdir $p mv perl-5.6.1.0.bff $p mv perl-5.6.1.0.bff.asc $p cd $p As root, inutoc . then smitty installp This installed the freeware.perl.rte 5.6.1.0 fileset, which put its perl at /usr/local/lib/perl. Despite the note above about being configured to interoperate with IBM's perl, a perl -V shows only /usr/local/lib/perl5 libraries. There were no /usr/opt/perl5/lib libraries as IBM's perl uses. This is why I put this stuff under Non-AIX-Standard_Builds instead of its sister AIX-Standard_Builds directory. And even if I tell my script to go use the old libraries by use lib "/usr/opt/perl5/lib/site_perl/5.005"; # To pick up Expect.pm use lib "/usr/opt/perl5/lib/site_perl/5.005/aix"; # To pick up IO/Pty.pm I get a Segmentation fault(coredump) when my script does a "use Expect" , which loads Expect.pm, which does a "use IO::Pty", which loads aix/IO/Pty.pm, and it does a "use IO::Tty", which loads aix/IO/Tty.pm (Maybe having something to do with DynaLoader?? I'm not sure. I don't understand the code.) (Carol says (Duh!!) You always have to rebuild your packages for any new version of Perl. This is supposed, presumed knowledge for anybody building Perl, but I never knew this.) I decided to replace IBM's perl with this new one and reinstall the Expect pieces (IO:Tty, IO:Stty, and Expect). 1) I renamed the /usr/bin/perl link to aix-perl (it points to /usr/opt/perl5/bin/perl5.00503), and replaced it with my own link that points perl -> /usr/local/bin/perl 2) cd /afs/d/software/base/perl_modules/Non-AIX-Standard_Builds gzip -d < ../Source/Expect-1.12.tar.gz | tar xvf - gzip -d < ../Source/IO-Stty-.02.tar.gz | tar xvf - gzip -d < ../Source/IO-Tty-0.05.tar.gz | tar xvf - 3) su cd IO-Tty-0.05 perl Makefile.PL make make test make install Oooops !!! This installed stuff in some funky, /ii/pa/perl-5.6.1 directory. What in the hell did that come from??? Ah, according to the Makefile, it came from /usr/local/lib/perl5/5.6.1/aix-thread/Config.pm, which did indeed have 22 instances of /ii/pa/perl-5.6.1, most importantly, on line 592, installbin='/ii/pa/perl-5.6.1/usr/local/bin' In the version 5.6.0.0 Config.pm file that Jeff Ingrim installed on trantor back on 4-27-2001, has a normal looking installbin='/usr/local/bin' I don't like this version of Perl. I'm going to uninstall and start over. installp -u freeware.perl.rte cd /afs/d/software/base/perl_modules rm -rf Source/perl-5.6.1.0.exe rm -rf Non-AIX-Standard_Builds/perl-5.6.1.0 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Reinstalling perl 5.6.1.0, this time from the source. Starting at http://www.cpan.org, follow the Source link and download stable.tar.gz. mv stable.tar.gz /afs/d/software/base/perl_modules/Source cd /afs/d/software/base/perl_modules/Source mv stable.tar.gz Perl-5.6.1.0.tar.gz cd /afs/d/software/base/perl_modules/Non-AIX-Standard_Builds gzip -d < ../Source/Perl-5.6.1.0.tar.gz | tar xvf - cd perl-5.6.1 Read README, README.aix, INSTALL. The INSTALL file says we basically do sh Configure -de make make test make install But I noticed in those many thousands of lines that fly by on the Configure, that it found /u/jasper/bin/less. Reviewing config.sh, I also saw that it put jasper@jasper.delphion.com in two e-mail lines, so I vi config.sh and changed these three lines, cf_email='jasper@jasper.delphion.com' pager='/usr/bin/more' perladmin='jasper@jasper.delphion.com' The comments at the top of config.sh, said "to propagate your changes" run Configure -der This rewrites config.sh and all derived files, e.g. Policy.sh. I then did make make test su make install Hey, great! Now /usr/local/bin/perl -v shows it's perl, v5.6.1 built for aix. The INSTALL file suggested I also do the following, but I didn't think I needed these, so I didn't do them (cd /usr/include && h2ph *.h sys/*.h) h2ph converts ".h C header files to .ph Perl header files" (installhtml --help) installhtml "converts a collection of POD pages to HTML format." (cd pod && make tex && ) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Now to go back and reinstall the Expect pieces (IO:Tty, IO:Stty, and Expect). With the /usr/bin/perl link still pointing to /usr/local/bin/perl, 1) cd /afs/d/software/base/perl_modules/Non-AIX-Standard_Builds su cd IO-Tty-0.05 perl Makefile.PL make make test make install 2) cd ../IO-Stty-.02 perl Makefile.PL make make test make install 3) cd ../Expect-1.12 perl Makefile.PL make make test make install =========================================================================== I still got the core file, reading in about 800,000 rows. I'm about to report a Perl bug, but first, I'll try their development version. Again, starting at http://www.cpan.org/src/index.html, this time I followed the devel.tar.gz link, which was Development release 5.7.2. This got me an 8 MB file that I mv devel.tar.gz /afs/d/software/base/perl_modules/Source cd /afs/d/software/base/perl_modules/Source mv devel.tar.gz Perl-5.7.2.0.tar.gz cd /afs/d/software/base/perl_modules/Non-AIX-Standard_Builds gzip -d < ../Source/Perl-5.7.2.0.tar.gz | tar xvf - cd perl-5.7.2 Read README, README.aix, INSTALL. We do just as before. sh Configure -de -Dusedevel vi config.sh and changed these three lines, cf_email='jasper@jasper.delphion.com' pager='/usr/bin/more' perladmin='jasper@jasper.delphion.com' Then sh Configure -Dusedevel -der This rewrites config.sh and all derived files, e.g. Policy.sh. I then did make The make died with this error message, ... ../miniperl -I../lib buildtoc buildtoc: creating perltoc.pod failed: The file access permissions do not allow the specified action. at buildtoc line 218. make: 1254-004 The error code from the last command is 13. Line 218 of the pod/buildtoc file was open(OUT, ">perltoc.pod") || die "$0: creating perltoc.pod failed: $!"; There WAS -r--r--r-- 1 jasper staff 271318 Jul 12 2001 pod/perltoc.pod Strange date, Jul 12, 2001 when I was doing this in Feb, 2002. That date must have come from the tar file. Since this looked like it was going to rewrite it, I mv pod/perltoc.pod pod/perltoc.pod.orig and reran the make. This time it seemed to get past that point, ... ../miniperl -I../lib buildtoc buildtoc: perltoc.pod is known by buildtoc but does not exist buildtoc: perltoc.pod is known by ../MANIFEST but does not exist buildtoc: perltoc.pod is known by perl.pod but does not exist buildtoc: ../lib/Net/FTP/A.pm: cannot find =head1 NAME buildtoc: ../lib/Net/FTP/dataconn.pm: cannot find =head1 NAME buildtoc: ../lib/Net/FTP/E.pm: cannot find =head1 NAME buildtoc: ../lib/Net/FTP/I.pm: cannot find =head1 NAME buildtoc: ../lib/Net/FTP/L.pm: cannot find =head1 NAME make test This failed at a couple of different points (e.g. lib/ExtUtils), but I think it just has something to do with AFS (which Perl is already known to not work well with), because if I move the perl-5.7.2 directory to a local file system (not AFS), it works fine. Well, "fine" in that I got All tests successful. but not fine in that I got rick. continue here =========================================================================== When testing for the existence of AFS files or directories, you cannot simply use Perl's built-in -f/-d tests. They will always return true, as if the file/directory exists. Here are three solutions for this. 1) Use the filetest pragma to override the built-in Perl tests, making them behave correctly. All you have to do is have this line use filetest 'access'; at the top of your Perl program. The problem with this, is the filetest.pm pragma is only available with Perl 5.6, not 5.005_03, which is what AIX 4.3.3 comes with. So you can install Perl 5.6, e.g. get perl-aix-5.6.0.0.exe from freeware.bull.net. Jeff Ingram installed this on trantor in /usr/local/bin/perl on 4-27-2001. 2) Use the stat Perl built-in function. At least this works with AFS, but it also has limitations. It evidently cannot distinguish between a link to something and that something itself. I.E. stat follows links. See my aixnotes/perl_examples/stat.test.pl for details and an illustration. 3) Code around it. E.G. Do your own ls -ld and see what the first character is. Again, you can see my aixnotes/perl_examples/stat.test.pl file for details. $ls=`ls -ld $thing 2>/dev/null`; if ($? >> 8) { $ls = "not there"; } elsif (substr($ls,0,1) eq "d") { $ls = "a directory"; } elsif (substr($ls,0,1) eq "-") { $ls = "a file"; } elsif (substr($ls,0,1) eq "l") { $ls = "a link"; } else { $ls = "something else"; } print "$thing is $ls\n"; =========================================================================== To view Perl documentation, use perldoc against the *pod file. E.G. perldoc /afs/d/software/base/perl_modules/AIX-Standard_Builds/Expect-1.12/Expect.pod =========================================================================== To change directories within a Perl program, use the built-in chdir() function, not backticks (e.g. `cd`). Do not use backticks (e.g. `cd`). The backtick'd cd is not long lasting, i.e. Perl launches a subshell, does the cd, then returns from that subshell. Likewise, don't use a system() call. It acts the same way. Use chdir(). One problem with chdir() though, is that it does not update your environment variable, $ENV{PWD}. To get the PWD environment variable to get updated when you use chdir(), have use Cwd 'chdir'; in your Perl program. (See the Camel, "Programming Perl-3rd Edition" book, pages 881-882. =========================================================================== Some perl cgi-bin debug code to get a timestamp & write to a local file, ($sec,$min,$hour)=(localtime)[0,1,2]; system ("echo '============ $hour:$min:$sec viewpat.test2.cmd ============' >> /tmp/viewpat.dbg"); system ("echo 'At 10 user=$user regplus=$regplus and ALLOWED=$ALLOWED' >> /tmp/viewpat.dbg"); or open(LOGFILE,">>/tmp/download.log"); print LOGFILE "=" x 80 . "\n"; ($sec,$min,$hour)=(localtime)[0,1,2]; printf LOGFILE "At 1, it's %02u:%02u:%02u and PATNUM=$PATNUM\n", $hour,$min,$sec; or ($sec,$min,$hour)=(localtime)[0,1,2];$debugts=sprintf("%02u:%02u:%02u",$hour,$min,$sec); print LOGFILE "At 1, it's $debugts and PATNUM=$PATNUM\n"; or to get the full day & time, ($sec,$min,$hour,$day,$mon,$year)=(localtime)[0,1,2,3,4,5]; $timestamp=sprintf("on %4u/%02u/%02u at %02u:%02u:%02u",1900+$year,$mon+1,$day,$hour,$min,$sec); print "patprt.pl called $timestamp with args >$save_input_args<"; =========================================================================== To see what version of perl you're running, you can perl -v =========================================================================== To see where perl goes to get it's include files, you can look at its INC list, via perl -e 'print "@INC\n"' =========================================================================== If you ever get these messages while running anything perl, even perl -v, perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LC__FASTMSG = "true", LANG = "en_US" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). the problem is your system is missing the bos.loc.iso.en_US fileset. =========================================================================== Notes on when I updated 5 & added 6 Perl modules on 12-14-2004, specifically, I updated Module Name Old -> New ============= ==== ===== Digest::MD5 2.20 2.33 HTML::Parser 3.26 3.43 MIME::Base64 2.12 3.05 libwww-perl 5.65 5.803 URI 1.19 1.35 and I added Compress-Zlib, Crypt::SSLeay, Digest, HTML::TokeParser-Simple, Sub-Override, and Test-Simple. But not HTML::Tagset <-- This was already at the latest level, 3.03 mod_perl <-- This was already at the latest level, 1.27 libnet <-- which didn't show up in the /dfs/prod/perl/lib/perl5/5.6.1/aix/perllocal.pod file, 'cause libnet ain't installed, so I guess I don't really need it. I'm also not upgrading or touching C::Scan (Not in SBY. Jim) CGI DBD::DB2 DBI Data::Flow (Not in SBY. Jim) FCGI Fractal (Not in SBY. Jim) Hdb (Not in SBY. Jim) MD5 Net::AIM (Not in SBY. Tom) Time::HiRes Vdk (Not in SBY. Jim) VerityC (Not in SBY. Jim) XML::Parser XML::Simple ################################################################ # # # C R I T I C A L N O T E ! ! ! # # # # This Perl modules refresh changes some .so libraries. # # "so" stands for "Shared Objects" and is what AIX loads # # into memory for shared use. "Shared library" is also # # what the "slib" of slibclean stands for. After you update # # the .so libraries on a running web server that is using # # one of the shared objects, you need to stop the web server, # # do a slibclean, then restart the web server. # # # ################################################################ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Go to http://www.cpan.org, follow the "modules" link, then "all modules" link, search for and download the packages you want. I downloaded into /afs/d/software/base/perl_modules/Source, Compress-Zlib-1.33.tar.gz Crypt-SSLeay-0.51.tar.gz Digest-1.10.tar.gz Digest-MD5-2.33.tar.gz HTML-Parser-3.43.tar.gz Sub-Override-0.06.tar.gz Test-Simple-0.54.tar.g HTML-TokeParser-Simple-3.13.tar.gz MIME-Base64-3.05.tar.gz URI-1.35.tar.gz libwww-perl-5.803.tar.gz I decided against updating these 3 packages, libnet-1.19.tar.gz <- I decided I really didn't need this. HTML-Tagset-3.03.tar.gz <- The latest version was already out there mod_perl-1.27.tar <- The latest version was already out there I decided to use my /tmp file system on jasper (AIX 4.3.3) to build. To unzip & untar, mkdir /tmp/perl_build cd /tmp/perl_build s=/afs/d/software/base/perl_modules/Source gunzip -d < $s/Compress-Zlib-1.33.tar.gz | tar xvf - gunzip -d < $s/Crypt-SSLeay-0.51.tar.gz | tar xvf - gunzip -d < $s/Digest-1.10.tar.gz | tar xvf - gunzip -d < $s/Digest-MD5-2.33.tar.gz | tar xvf - gunzip -d < $s/HTML-Parser-3.43.tar.gz | tar xvf - gunzip -d < $s/Sub-Override-0.06.tar.gz | tar xvf - gunzip -d < $s/Test-Simple-0.54.tar.gz | tar xvf - gunzip -d < $s/HTML-TokeParser-Simple-3.13.tar.gz | tar xvf - gunzip -d < $s/MIME-Base64-3.05.tar.gz | tar xvf - gunzip -d < $s/URI-1.35.tar.gz | tar xvf - gunzip -d < $s/libwww-perl-5.803.tar.gz | tar xvf - Then process each package. ============================================================== = Something I just learned today. How you call perl here = = with the Makefile.PL, determines which configuration you = = pick up. Specifically calling /dfs/prod/perl/bin/perl, = = causes the configuration to be read from = = /dfs/prod/perl/lib/perl5/5.6.1/aix/Config.pm, which is = = from the configure step from when this version of Perl = = was built. (Common knowledge? Well, it was new to me.) = ============================================================== ------ Compress-Zlib cd /tmp/perl_build/Compress-Zlib-1.33 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 5 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/aix/auto/Compress/Zlib/Zlib.so lib/perl5/site_perl/5.6.1/aix/auto/Compress/Zlib/Zlib.bs lib/perl5/site_perl/5.6.1/aix/auto/Compress/Zlib/autosplit.ix lib/perl5/site_perl/5.6.1/aix/Compress/Zlib.pm man/man3/Compress::Zlib.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Compress/Zlib/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ Crypt-SSLeay cd /tmp/perl_build/Crypt-SSLeay-0.51 /dfs/prod/perl/bin/perl Makefile.PL This asked me Found OpenSSL (version OpenSSL 0.9.7) installed at /usr/local/ssl Which OpenSSL build path do you want to link against? [/usr/local/ssl] I changed this to /dfs/prod/openssl make make install This copied these 4 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/aix/auto/Crypt/SSLeay/SSLeay.so lib/perl5/site_perl/5.6.1/aix/Net/SSL.pm lib/perl5/site_perl/5.6.1/aix/Crypt/SSLeay.pm man/man3/Crypt::SSLeay.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Crypt/SSLeay/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ Digest cd /tmp/perl_build/Digest-1.10 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 6 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/Digest.pm lib/perl5/site_perl/5.6.1/Digest/base.pm lib/perl5/site_perl/5.6.1/Digest/file.pm man/man3/Digest::base.3 man/man3/Digest::file.3 man/man3/Digest.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Digest/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ Digest-MD5 cd /tmp/perl_build/Digest-MD5-2.33 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 3 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/aix/auto/Digest/MD5/MD5.so lib/perl5/site_perl/5.6.1/aix/Digest/MD5.pm man/man3/Digest::MD5.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Digest/MD5/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ HTML-Parser cd /tmp/perl_build/HTML-Parser-3.43 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 14 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/aix/auto/HTML/Parser/Parser.so lib/perl5/site_perl/5.6.1/aix/HTML/HeadParser.pm lib/perl5/site_perl/5.6.1/aix/HTML/LinkExtor.pm lib/perl5/site_perl/5.6.1/aix/HTML/PullParser.pm lib/perl5/site_perl/5.6.1/aix/HTML/Parser.pm lib/perl5/site_perl/5.6.1/aix/HTML/Entities.pm lib/perl5/site_perl/5.6.1/aix/HTML/TokeParser.pm lib/perl5/site_perl/5.6.1/aix/HTML/Filter.pm man/man3/HTML::HeadParser.3 man/man3/HTML::LinkExtor.3 man/man3/HTML::PullParser.3 man/man3/HTML::Parser.3 man/man3/HTML::Entities.3 man/man3/HTML::TokeParser.3 man/man3/HTML::Filter.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/HTML/Parser/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ Sub-Override cd /tmp/perl_build/Sub-Override-0.06 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 2 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/Sub/Override.pm man/man3/Sub::Override.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Sub/Override/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ Test-Simple cd /tmp/perl_build/Test-Simple-0.54 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 8 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/Test/Tutorial.pod lib/perl5/site_perl/5.6.1/Test/Builder.pm lib/perl5/site_perl/5.6.1/Test/Simple.pm lib/perl5/site_perl/5.6.1/Test/More.pm man/man3/Test::Tutorial.3 man/man3/Test::Builder.3 man/man3/Test::Simple.3 man/man3/Test::More.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/Test/Simple/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ HTML-TokeParser cd /tmp/perl_build/HTML-TokeParser-Simple-3.13 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 18 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Text.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Tag.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/ProcessInstruction.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Comment.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Declaration.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Tag/End.pm lib/perl5/site_perl/5.6.1/HTML/TokeParser/Simple/Token/Tag/Start.pm man/man3/HTML::TokeParser::Simple::Token::Text.3 man/man3/HTML::TokeParser::Simple::Token::Tag::End.3 man/man3/HTML::TokeParser::Simple::Token::Tag.3 man/man3/HTML::TokeParser::Simple.3 man/man3/HTML::TokeParser::Simple::Token::Tag::Start.3 man/man3/HTML::TokeParser::Simple::Token::ProcessInstruction.3 man/man3/HTML::TokeParser::Simple::Token.3 man/man3/HTML::TokeParser::Simple::Token::Comment.3 man/man3/HTML::TokeParser::Simple::Token::Declaration.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/HTML/TokeParser/Simple/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ MIME-Base64 cd /tmp/perl_build/MIME-Base64-3.05 /dfs/prod/perl/bin/perl Makefile.PL make make test make install This copied these 9 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/aix/MIME/Base64.pm lib/perl5/site_perl/5.6.1/aix/MIME/QuotedPrint.pm bin/encode-qp bin/encode-base64 bin/decode-base64 bin/decode-qp lib/perl5/site_perl/5.6.1/aix/auto/MIME/Base64/Base64.so man/man3/MIME::Base64.3 man/man3/MIME::QuotedPrint.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/MIME/Base64/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ URI cd /tmp/perl_build/URI-1.35 /dfs/prod/perl/bin/perl Makefile.PL make make install This copied these 43 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/URI.pm lib/perl5/site_perl/5.6.1/URI/_generic.pm lib/perl5/site_perl/5.6.1/URI/_ldap.pm lib/perl5/site_perl/5.6.1/URI/urn.pm lib/perl5/site_perl/5.6.1/URI/file.pm lib/perl5/site_perl/5.6.1/URI/Heuristic.pm lib/perl5/site_perl/5.6.1/URI/http.pm lib/perl5/site_perl/5.6.1/URI/rtsp.pm lib/perl5/site_perl/5.6.1/URI/sips.pm lib/perl5/site_perl/5.6.1/URI/mms.pm lib/perl5/site_perl/5.6.1/URI/sip.pm lib/perl5/site_perl/5.6.1/URI/ldaps.pm lib/perl5/site_perl/5.6.1/URI/URL.pm lib/perl5/site_perl/5.6.1/URI/tn3270.pm lib/perl5/site_perl/5.6.1/URI/Escape.pm lib/perl5/site_perl/5.6.1/URI/data.pm lib/perl5/site_perl/5.6.1/URI/Split.pm lib/perl5/site_perl/5.6.1/URI/ldap.pm lib/perl5/site_perl/5.6.1/URI/_query.pm lib/perl5/site_perl/5.6.1/URI/_server.pm lib/perl5/site_perl/5.6.1/URI/rtspu.pm lib/perl5/site_perl/5.6.1/URI/ldapi.pm lib/perl5/site_perl/5.6.1/URI/WithBase.pm lib/perl5/site_perl/5.6.1/URI/gopher.pm lib/perl5/site_perl/5.6.1/URI/QueryParam.pm lib/perl5/site_perl/5.6.1/URI/urn/oid.pm lib/perl5/site_perl/5.6.1/URI/urn/isbn.pm lib/perl5/site_perl/5.6.1/URI/file/Base.pm lib/perl5/site_perl/5.6.1/URI/file/OS2.pm lib/perl5/site_perl/5.6.1/URI/file/Mac.pm lib/perl5/site_perl/5.6.1/URI/file/QNX.pm lib/perl5/site_perl/5.6.1/URI/file/Win32.pm lib/perl5/site_perl/5.6.1/URI/file/Unix.pm man/man3/URI::Escape.3 man/man3/URI.3 man/man3/URI::WithBase.3 man/man3/URI::data.3 man/man3/URI::QueryParam.3 man/man3/URI::Split.3 man/man3/URI::file.3 man/man3/URI::ldap.3 man/man3/URI::URL.3 man/man3/URI::Heuristic.3 and also updated lib/perl5/site_perl/5.6.1/aix/auto/URI/.packlist lib/perl5/5.6.1/aix/perllocal.pod ------ libwww-perl cd /tmp/perl_build/libwww-perl-5.803 /dfs/prod/perl/bin/perl Makefile.PL This produced a few messages and asked a few questions, most of which I took the default for, except for The lwp-request program will use the name it is invoked with to determine what HTTP method to use. I can set up alias for the most common HTTP methods. These alias are also installed in /dfs/prod/perl/bin. Do you want to install the GET alias? [n] y Do you want to install the HEAD alias? [n] y Do you want to install the POST alias? [n] y I noticed that Carol had these 3 (GET, HEAD, & POST) in /dfs/prod/perl/bin, so she must have answered yes here, so I did, too. ... It also complained about missing the Net::FTP module, which is a part of libnet. Tough. It wasn't installed before and I don't need it, so I'm leaving it out. make make install This copied these 97 files into /dfs/prod/perl lib/perl5/site_perl/5.6.1/lwptut.pod lib/perl5/site_perl/5.6.1/LWP.pm lib/perl5/site_perl/5.6.1/lwpcook.pod lib/perl5/site_perl/5.6.1/Net/HTTP.pm lib/perl5/site_perl/5.6.1/Net/HTTPS.pm lib/perl5/site_perl/5.6.1/Net/HTTP/Methods.pm lib/perl5/site_perl/5.6.1/Net/HTTP/NB.pm lib/perl5/site_perl/5.6.1/File/Listing.pm lib/perl5/site_perl/5.6.1/HTML/Form.pm lib/perl5/site_perl/5.6.1/WWW/RobotRules.pm lib/perl5/site_perl/5.6.1/WWW/RobotRules/AnyDBM_File.pm lib/perl5/site_perl/5.6.1/HTTP/Cookies.pm lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm lib/perl5/site_perl/5.6.1/HTTP/Status.pm lib/perl5/site_perl/5.6.1/HTTP/Message.pm lib/perl5/site_perl/5.6.1/HTTP/Negotiate.pm lib/perl5/site_perl/5.6.1/HTTP/Headers.pm lib/perl5/site_perl/5.6.1/HTTP/Request.pm lib/perl5/site_perl/5.6.1/HTTP/Response.pm lib/perl5/site_perl/5.6.1/HTTP/Date.pm lib/perl5/site_perl/5.6.1/HTTP/Headers/Util.pm lib/perl5/site_perl/5.6.1/HTTP/Headers/Auth.pm lib/perl5/site_perl/5.6.1/HTTP/Headers/ETag.pm lib/perl5/site_perl/5.6.1/HTTP/Request/Common.pm lib/perl5/site_perl/5.6.1/HTTP/Cookies/Netscape.pm lib/perl5/site_perl/5.6.1/HTTP/Cookies/Microsoft.pm lib/perl5/site_perl/5.6.1/Bundle/LWP.pm lib/perl5/site_perl/5.6.1/LWP/Protocol.pm lib/perl5/site_perl/5.6.1/LWP/ConnCache.pm lib/perl5/site_perl/5.6.1/LWP/RobotUA.pm lib/perl5/site_perl/5.6.1/LWP/MemberMixin.pm lib/perl5/site_perl/5.6.1/LWP/media.types lib/perl5/site_perl/5.6.1/LWP/Simple.pm lib/perl5/site_perl/5.6.1/LWP/DebugFile.pm lib/perl5/site_perl/5.6.1/LWP/Debug.pm lib/perl5/site_perl/5.6.1/LWP/UserAgent.pm lib/perl5/site_perl/5.6.1/LWP/MediaTypes.pm lib/perl5/site_perl/5.6.1/LWP/Authen/Ntlm.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/nntp.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/ftp.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/mailto.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/loopback.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/GHTTP.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/https10.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/http10.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/https.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/file.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/gopher.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/cpan.pm lib/perl5/site_perl/5.6.1/LWP/Protocol/http.pm man/man1/lwp-request.1 man/man1/POST.1 man/man1/lwp-rget.1 man/man1/HEAD.1 man/man1/GET.1 man/man1/lwp-mirror.1 man/man1/lwp-download.1 man/man3/lwptut.3 man/man3/LWP::Protocol.3 man/man3/Bundle::LWP.3 man/man3/HTTP::Cookies.3 man/man3/HTTP::Daemon.3 man/man3/HTTP::Status.3 man/man3/HTTP::Message.3 man/man3/WWW::RobotRules.3 man/man3/LWP::ConnCache.3 man/man3/LWP::RobotUA.3 man/man3/LWP.3 man/man3/HTTP::Negotiate.3 man/man3/LWP::Authen::Ntlm.3 man/man3/LWP::MemberMixin.3 man/man3/WWW::RobotRules::AnyDBM_File.3 man/man3/HTTP::Cookies::Netscape.3 man/man3/HTML::Form.3 man/man3/File::Listing.3 man/man3/HTTP::Cookies::Microsoft.3 man/man3/HTTP::Headers.3 man/man3/HTTP::Request::Common.3 man/man3/HTTP::Headers::Util.3 man/man3/LWP::Simple.3 man/man3/HTTP::Request.3 man/man3/LWP::DebugFile.3 man/man3/HTTP::Response.3 man/man3/Net::HTTP.3 man/man3/Net::HTTP::NB.3 man/man3/HTTP::Date.3 man/man3/LWP::Debug.3 man/man3/LWP::UserAgent.3 man/man3/lwpcook.3 man/man3/LWP::MediaTypes.3 bin/POST bin/GET bin/lwp-mirror bin/lwp-request bin/HEAD bin/lwp-download bin/lwp-rget and also updated lib/perl5/site_perl/5.6.1/aix/auto/libwww-perl/.packlist lib/perl5/5.6.1/aix/perllocal.pod =========================================================================== Notes on when I obtained and installed the libwww-perl & mod_perl packages on 1-24-2001. Go to http://www.cpan.org, follow the "modules" link, then "all modules" link, and search for the package you want. They come in *.tar.gz format, e.g. libwww-perl-5.49.tar.gz & mod_perl-1.24.tar.gz To unzip & untar, gunzip -d < libwww-perl-5.49.tar.gz | tar xvf - & gunzip -d < mod_perl-1.24.tar.gz | tar xvf - To build, su cd libwww-perl-5.49 & perl Makefile.PL This complains about missing some other Perl packages, namely Package So I Also Picked Up Which Itself Required ============ ======================= ===================== URI URI-1.09.tar.gz HTML-Tagset HTML-Parser HTML-Parser-3.15.tar.gz libnet libnet-1.0703.tar.gz MIME-Base64 MIME-Base64-2.11.tar.gz Digest Digest-MD5-2.12.tar.gz and gunzip -d < URI-1.09.tar.gz | tar xvf - gunzip -d < HTML-Parser-3.15.tar.gz | tar xvf - gunzip -d < libnet-1.0703.tar.gz | tar xvf - gunzip -d < MIME-Base64-2.11.tar.gz | tar xvf - gunzip -d < Digest-MD5-2.12.tar.gz | tar xvf - So, starting over, su cd MIME-Base64-2.11 perl Makefile.PL make make test make install This installed From ~/MIME-Base64-2.11/ To /usr/opt/perl5/lib/site_perl/5.005/aix/ ============== ========================== ========================================== QuotedPrint.pm blib/lib/MIME MIME Base64.so blib/arch/auto/MIME/Base64 auto/MIME/Base64 Base64.bs blib/arch/auto/MIME/Base64 auto/MIME/Base64/ Base64.pm blib/lib/MIME MIME Next is URI, cd ../URI-1.09 perl Makefile.PL make make test make install This installed 33 files under /usr/opt/perl5/lib/site_perl/5.005/URI/. For HTML-Parser, cd ../HTML-Parser-3.15 perl Makefile.PL Gave "Warning: prerequisite HTML::Tagset 3 not found at (eval 1) line 220." message. So I went back to CPAN and picked up HTML-Tagset-3.03.tar.gz. cd gunzip -d < HTML-Tagset-3.03.tar.gz | tar xvf - cd HTML-Tagset-3.03 perl Makefile.PL make make test make install This installed 1 file, /usr/opt/perl5/lib/site_perl/5.005/HTML/Tagset.pm. Now, back to HTML-Parser, cd ../HTML-Parser-3.15 perl Makefile.PL No errors or warnings this time. Good. make make test make install This installed 2 files under /usr/opt/perl5/lib/site_perl/5.005/aix/auto/HTML/Parser and 6 files under /usr/opt/perl5/lib/site_perl/5.005/aix/HTML Now try libnet, cd ../libnet-1.0703 perl Makefile.PL This said that I already have libnet installed. Hmmmm. I went ahead and answered "y" to the "Do you want to modify/update your configuration?" prompt, and it asked me for - a bunch of different servers, NNTP, SMTP, POP3,SNPP, PH, TIME, DAYTIME (all blank), - whether or not we have a SOCKS server (no), - active or passive ftp (passive), - our "local internet domain name" (delphion.com). make make test make install This installed 19 files under /usr/opt/perl5/lib/site_perl/5.005/Net. Now Digest, cd ../Digest-MD5-2.12 perl Makefile.PL make make test make install This installed 6 files under /usr/opt/perl5/lib/site_perl/5.005/aix/auto/Digest and 6 files under /usr/opt/perl5/lib/site_perl/5.005/aix/Digest and 3 files under /usr/opt/perl5/lib/site_perl/5.005/aix Now finally, back to libwww-perl, cd ../libwww-perl-5.49 perl Makefile.PL make make test make install This installed 13 files under /usr/opt/perl5/lib/site_perl/5.005/HTTP and 19 files under /usr/opt/perl5/lib/site_perl/5.005/LWP and 2 files under /usr/opt/perl5/lib/site_perl/5.005/WWW and 1 file under /usr/opt/perl5/lib/site_perl/5.005/File and 2 files under /usr/opt/perl5/lib/site_perl/5.005 and 1 file under /usr/opt/perl5/lib/site_perl/5.005/HTML and 1 file under /usr/opt/perl5/lib/site_perl/5.005/Bundle and 7 files under /usr/opt/perl5/bin (Note 11-25-2002: If you're simply doing the "make install" on some system, strangely enough, you need to be klog'd to AFS so that root can (re)write the 3 links (GET, HEAD, POST) in the /afs/d/software/base/perl_modules/AIX-Standard_Builds/libwww-perl-5.49/blib/script directory. You would have thought that a "make install" wouldn't need to write ANYTHING in the source directories, but in this case, you'd be wrong.) And lastly, mod_perl, cd ../mod_perl-1.24 perl Makefile.PL This asked me Please tell me where I can find your apache src Ughhhh. Well, I did have the http_server.base.source fileset installed, which created the /usr/HTTPServer/apachesrc directory with two tar.gz files in it. I inflated the big one, cd /usr/HTTPServer/apachesrc gzip -d < apache_tar.gz | tar xf - and answered /usr/HTTPServer/apachesrc/apache-1.3/src It then asked Configure mod_perl with /usr/HTTPServer/apachesrc/apache-1.3/src ? [y] y Shall I build httpd in /usr/HTTPServer/apachesrc/apache-1.3/src for you? [y] y make This created 130 files under the blib directory. make test make install This installed 86 files under /usr/opt/perl5/lib/site_perl/5.005/aix/auto/Apache and 36 files under /usr/opt/perl5/lib/site_perl/5.005/aix/Apache and 9 files under /usr/opt/perl5/lib/site_perl/5.005/aix =========================================================================== I moved all these Perl directories under their own subdirectories under /afs/d/software/base/CPAN, but Carol couldn't find it one day, so maybe this wasn't the best place for it. After discussing it with her, we decided to put everything under /afs/d/software/base/perl_modules. See the README there for details. =========================================================================== Notes from when I installed the Expect mod to Perl on 11-13-2001. Got Expect-1.12.tar.gz from http://search.cpan.org/search?module=Expect gzip -d < Expect-1.12.tar.gz | tar xvf - shows Expect-1.12 Expect-1.12/examples Expect-1.12/examples/kibitz Expect-1.12/examples/kibitz/kibitz.man, 6420 bytes, 13 media blocks. Expect-1.12/examples/kibitz/Changelog, 322 bytes, 1 media blocks. Expect-1.12/examples/kibitz/kibitz, 7010 bytes, 14 media blocks. Expect-1.12/examples/kibitz/README, 898 bytes, 2 media blocks. Expect-1.12/tutorial Expect-1.12/tutorial/4.A.top, 934 bytes, 2 media blocks. Expect-1.12/tutorial/5.A.top, 1145 bytes, 3 media blocks. Expect-1.12/tutorial/5.B.top, 2456 bytes, 5 media blocks. Expect-1.12/tutorial/6.B.modem-init, 1833 bytes, 4 media blocks. Expect-1.12/tutorial/README, 452 bytes, 1 media blocks. Expect-1.12/tutorial/2.A.ftp, 3091 bytes, 7 media blocks. Expect-1.12/tutorial/6.A.smtp-verify, 3260 bytes, 7 media blocks. Expect-1.12/tutorial/1.A.Intro, 2428 bytes, 5 media blocks. Expect-1.12/tutorial/2.B.rlogin, 4049 bytes, 8 media blocks. Expect-1.12/tutorial/3.A.debugging, 1979 bytes, 4 media blocks. Expect-1.12/Makefile.PL, 468 bytes, 1 media blocks. Expect-1.12/test.pl, 1606 bytes, 4 media blocks. Expect-1.12/README, 3117 bytes, 7 media blocks. Expect-1.12/Expect.pm, 51000 bytes, 100 media blocks. Expect-1.12/MANIFEST, 359 bytes, 1 media blocks. Expect-1.12/Changes, 7333 bytes, 15 media blocks. Expect-1.12/Expect.pod, 32334 bytes, 64 media blocks. So I gzip -d < Expect-1.12.tar.gz | tar tvf - To build, su cd Expect-1.12 & perl Makefile.PL and it complained about needing various IO modules, namely IO::Pty (part of IO::Tty) IO::Stty and IO::Tty Searched CPAN for it and downloaded IO-Stty-.02.tar.gz and IO-Tty-0.05.tar.gz gzip -d < IO-Stty-.02.tar.gz | tar tvf - gzip -d < IO-Tty-0.05.tar.gz | tar tvf - su cd IO-Tty-0.05 perl Makefile.PL make make test make install cd ../IO-Stty-.02 perl Makefile.PL make make test make install cd ../Expect-1.12 perl Makefile.PL Interestingly, this now complained about Parens missing around "my" list at /usr/opt/perl5/lib/site_perl/5.005/aix/IO/Pty.pm line 21. Useless use of a variable in void context at /usr/opt/perl5/lib/site_perl/5.005/aix/IO/Pty.pm line 21. although it appeared to go ahead and write the "Makefile for Expect" make make test make install exit See the Expect-1.12/tutorial directory for a quick tutorial. =========================================================================== The Perl book (pg 738-9) shows the usage of the localtime function as ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); It goes on to say, "The Perl library module Time::Local contains a subroutine, timelocal, that can convert in the opposite direction." which is convenient when wanting to do date arithmatic, e.g. add 7 days to today. When the book is presuming you know is, if you want to use timelocal, you need this line in your Perl program. use Time::Local; Starting with $mm, $dd, and $yyyy, as humans expect, (e.g. December 7, 2001 => mm=12, dd=7, and yyyy=2001), here is how you reliably find next week's date. #!/bin/perl $mm=12; $dd=7; $yyyy=2001; # Starting point, 12/07/2001. use Time::Local; # Need this to get timelocal defined. @z2=('00' .. '32'); # A handy array to get zero-padding on my mm/dd; # See Perl book on page 104. print " Starting with $z2[$mm]/$z2[$dd]/$yyyy,\n"; for (1..60) { # Loop through a year to prove this works across # Daylight Savings time, New Year's, and Leap Day transitions. # Note the interesting way of saying, do something 60 times. # Inside this loop, $_ is our loop index, ranging from 1 to 60. # Note that 608400 seconds = 1 week + 1 hour. This handles the fall # Daylight Savings Time transition correctly, and since we don't care # about the time of day, we can get away with this sloppiness. $number_seconds = timelocal(0,0,0,$dd,$mm-1,$yyyy-1900) + 608400; # A cute way to extract just a slice of what localtime returns. ($dd,$mm,$yyyy)=(localtime($number_seconds))[3..5]; $mm++; $yyyy+=1900; # Adjust for localtime's idiosyncracies. print "one more week makes it $z2[$mm]/$z2[$dd]/$yyyy,\n"; } =========================================================================== On 11-25-2002, I was trying to use POST & HTTPS together from Perl to interface with the Patolis Nova translation server. I needed LWP, which is a part of libwww-perl (see above), but to do SSL, I also needed Crypt:SSLeay (see perldoc LWP or better, perldoc lwpcook). Go to http://www.cpan.org, follow the "Perl modules" link, then "all modules" link, and found Crypt-SSLeay-0.45.tar.gz, which I put in /afs/d/software/base/perl_modules/Source. To unzip & untar, cd /afs/d/software/base/perl_modules/AIX-Standard_Builds & gunzip -d < ../Source/Crypt-SSLeay-0.45.tar.gz | tar xvf - To build, as root on reindeer & klog'd as jasper, cd /afs/d/software/base/perl_modules/AIX-Standard_Builds/Crypt-SSLeay-0.45 & perl Makefile.PL Doing this on jasper gave me something I've never seen before, > perl Makefile.PL Found the following OpenSSL installations: OpenSSL 0.9.6 /usr/local/ssl OpenSSL 0.9.6 /usr/local Which OpenSSL build path do you want to link against? [/usr/local/ssl] but on reindeer, I got No OpenSSL installation found, usually in /usr/local/openssl Which OpenSSL build path do you want to link against? I needed OpenSSL on reindeer first, which I had in ~jasper/openssl-0.9.6d cd ~jasper/openssl-0.9.6d make install Trying again, cd /afs/d/software/base/perl_modules/AIX-Standard_Builds/Crypt-SSLeay-0.45 & perl Makefile.PL ran ok, and make test also ran ok. make install installed 2 files in /usr/opt/perl5/lib/site_perl/5.005/aix/auto/Crypt/SSLeay 6 files in /usr/opt/perl5/lib/site_perl/5.005/aix/Crypt/SSLeay 1 file in /usr/opt/perl5/lib/site_perl/5.005/aix/Net =========================================================================== To get rid of AIX's default Perl's error messages, perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LC__FASTMSG = "true", LANG = "en_US" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). you can verify the en_US locale is truly missing with the locale -a command. On spectre when I was getting this, it showed only C and POSIX, whereas on jasper, it showed C, POSIX, en_US, en_US.8859-15, and en_US.ISO8859-1. To fix permanently, install the bos.loc.iso.en_US fileset, which can be found in the bos.loc.iso file from the AIX Install CD. =========================================================================== AIX's ancient 5.005_03 version of Perl, doesn't allow the use of "exists" for arrays, only hashes. So for example, in Southbury, perl -e '$CoC_Start[2]=1;if (exists $CoC_Start[2]){print "Yes\n"}else{print "No\n"}' gives you this error message exists operator argument is not a HASH element at -e line 1. But the same line fed to our newer Perl, /dfs/prod/ipn/bin/perl -e '$CoC_Start[2]=1;if (exists $CoC_Start[2]){print "Yes\n"}else{print "No\n"}' works fine (ie, it prints "Yes"). Using "exists" for hashes works with any Perl. perl -e '$CoC_Start{2}=1;if (exists $CoC_Start{2}){print "Yes\n"}else{print "No\n"}' prints "Yes" =========================================================================== A lesson from the School of Hard Knocks. Any of the 3 ways of executing a command, system(), open(...|), or backticks, will launch a shell and run ones .profile & .kshrc if there are shell characters in the command string. For example, system("ls .kshrc") Does not invoke .kshrc but system("ls .kshrc; ls .profile") Does invoke .kshrc and system("ls .kshrc | grep foo") Also calls your .kshrc The problem is, it does this without the benefit of a console, so if you had some command like a who or whoami in your .kshrc (like I did to set my PS1 string and check for extra stayalives and see where I'm logged in from), then you get the following errors, which are lots of "fun" to track down. process not attached to terminal Usage: who [-AabdHilmpqrsTtuw] [am {i,I}] [file] A Accounting entries a All (AbdHlprTtu) options b Boot time d Dead processes It was the whoami command inside my .kshrc that was complaining. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - What I really need to do one day, is to create a grid so I can get all these options straight in my head. Along one side, I'd have * open(cmd|) * system(cmd) * `cmd` * open(cd foo;cmd) * system(cd foo;cmd) * `cd foo;cmd` * open(cmd|grep foo) * system(cmd|grep foo) * `cmd|grep foo` and across the top, I'd have all the pros & cons, e.g. * Spawns a subshell? * Runs .profile & .kshrc? * Is the output available to the program? * Is the return code available? * Function returns ===========================================================================