#!/usr/local/bin/perl # The Book of the Law # # Chapter I # # 1.Had! The manifestation of Nuit. $Had = open(NUIT); # 2.The unveiling of the company of heaven. while () { print $_; } # 3.Every man and every woman is a star. foreach $person (keys %People) { if ($People{$person}{gender} == "male" || $People{$person}{gender} == "female") { $People{$person}{what} = "star"; } } # 4.Every number is infinite; there is no difference. do { print "Enter two comma-separated numbers: "; $numbers = ; @numbers = split /,/, $numbers; @numbers[0] = inf if @numbers[0] += 0; @numbers[1] = inf if @numbers[1] += 0; if ((@numbers[0] == @numbers[1]) && (@numbers[0] += 0)) { print "No difference. Again? "; $again = ; } else { print "Incorrect input. "; } } until $again =~ /n/i; # 5.Help me, o warrior lord of Thebes, in my unveiling before # the Children of men! if (-e "/home/Thebes/warlord/help") { chmod 0666, NUIT; } # 6.Be thou Hadit, my secret centre, my heart & my tongue! my ($secret_centre, $heart, $tongue) = @Hadit; # 7.Behold! it is revealed by Aiwass the minister of Hoor-paar-kraat. # 8.The Khabs is in the Khu, not the Khu in the Khabs. %HPK = { culture => "Egypt", form => "Hawk-headed, mystical", minister => [ { name => "Aiwass", number => 418, revelation => ($Khu =~ /Khabs/ && $Khabs !~ /Khu/) }, ] }; # 9.Worship then the Khabs, and behold my light shed over you! do { $Khabs->worship(); } until behold(my $light); # 10.Let my servants be few & secret: they shall rule the many & the known. @svtgrp = getgrnam all_svts; my @svts = split / /, @svtgrp[3]; splice(@svts, 10, ((scalar @svts) - 10)); open(SERVANTS,">./svtlist"); while (<@svts>) { print SERVANTS "$_\n"; } close(SERVANTS); &chown_by_name("root","./svtlist"); use File::Find; find (\&wanted, '/'); sub wanted { push @many, "$File::Find::name\n" if -rR } @svts->rule(@many); # 11.These are fools that men adore; both their Gods & their men are fools. $men->adore($fools{Gods}, $fools{men}); # 12.Come forth, o children, under the stars, & take your fill of love! while ($children{love}{full} >= 0 && $children{love}{full} < 100) { if ($children{where} == "under the stars") { $children{love}{full}++; } }