user
wog
<!--location:latitude=41.48.26,longitude=-71.16.07-->
<!--os:Linux-->
<!--birthday:1985/10/10-->
<div align="center">
<form method="POST">
<input type="submit" value="Don't click here!">
<input type="hidden" name="stupidity level" value="high">
</form>
</div>
<p align="center">
"It's sad. I always find things in the <em>last place</em> I look
for them."
</p>
<p>
<a href="http://www.prism.gatech.edu/~gtg303y">@gatech.edu</a>
</p>
<p>
<a href="/index.pl?node_id=108949&user=wog">my scratch pad</a>
</p>
<code>
perl -e '$|--;$.=q$.$;while($i!=0){$i=(time-$^T)%60;print"\r".$.x$i}'
</code>
<hr>
<code>
# -- MeaningOfLifeTheUniverseAndEverything.pm --
package MeaningOfLifeTheUniverseAndEverything;
use strict;
sub _create { bless \(my $_42 = 42) }
sub _value { 42 }
use overload
'0+' => \&_value,
'nomethod' => \&_create;
sub import {
overload::constant
integer => \&_create,
float => \&_create;
}
sub unimport {
use Carp;
croak "You can't get rid of the Meaning of Life, "
."the Universe, and Everything";
}
q{
32
};
__END__
=head1 NAME
MeaningOfLifeTheUniverseAndEverything
=head1 SYNOPSIS
use MeaningOfLifeTheUniverseAndEverything;
=head1 DESCRIPTION
This module replaces all other numbers with the answer
to the ultimate quesiton of life, the universe and
everything throughout the program it is run from.
=head1 NOTE
It is a fatal error to attempt to get rid of the meaning
of life, the universe and everything.
=head1 BUGS
This module cannot turn nothing (a literal 0) into the
answer. This is of course perl's fault, since anything
associated with HHGTG wouldn't have such obvious faults
(unless the guide gets taken over by some evil company
or something like that.)
=head1 SEE ALSO
I<The Hitchhiker's Guide to the Galaxy>.
=cut
# -- test.pl --
#!/usr/bin/perl -w
use strict;
use MeaningOfLifeTheUniverseAndEverything;
sub value {
(defined $_[0]) ? $_[0] : 'undef';
}
sub show {
foreach my $expr (@_) {
print $expr, " = ", value(eval $expr), "\n";
print "(error: $@)\n" if $@;
}
}
show split /\n/ => <<'END';
4.2 * 10
4.2 * 9 + 1
2 + 2
42 - 1
3 % 2
0
END
</code>
<hr>
<code>
sub warningless_require_module { # * untested *
use File::Spec;
use Carp;
my $module = shift;
my @module = split /::/, $module;
$module[-1] .= ".pm";
my $file;
for (@INC) {
$file = File::Spec->catfile($_,@module);
last if -f $file;
}
if (!-f _) {
die "Can't locate $file in \@INC (\@INC contains @INC)\n";
}
my $res;
{
local $^W = 0;
$res = do $file;
}
unless ($res) {
die $@ if $@;
croak "file didn't return a true value";
}
$INC{File::Spec->catfile(@module)} = $file;
{
no strict 'refs';
foreach my $raw_name (keys %{$module."::"}) {
my $name = $module."::".$raw_name;
if (defined &{$name}) {
my $sub = \&{$name};
*{$name} = sub {
local $^W = 0;
&$meth;
};
}
}
}
return $res;
}
</code>
2013-09-30 03:10:21
3215
358592
543613
248
<!-- Given the existence as uttered forth in the public works of Puncher and Wattmann of a personal God quaquaquaqua with white beard quaquaquaqua outside time without extension who from the heights of divine apathia divine athambia divine aphasia loves us dearly with some exceptions for reasons unknown but time will tell and suffers like the divine Miranda with those who for reasons unknown but time will tell are plunged in torment plunged in fire whose fire flames if that continues and who can doubt it will fire the firmament that is to say blast hell to heaven so blue still and calm so calm with a calm which even though intermittent is better than nothing but not so fast and considering what is more that as a result of the labors left unfinished crowned by the Acacacacademy of Anthropopopometry of Essy-in-Possy of Testew and Cunard it is established beyond all doubt all other doubt than that which clings to the labors of men that as a result of the labors unfinished of Testew and Cunnard it.... -->
America/New_York
86
on