in reply to Atlas and the Earth
$n is a simple binary unpacker. It unpacks $x to a Perl Tk JAPH program. I guess the #! line is ignored?
## most of original code omitted for space
## commented out eval
#eval($n);
## print instead
#print "$n\n";
## the string itself
#my$X;$x=~s/\s+//g;while($x=~m/(^.{8})/s){$X=$X.chr(unpack("N",pack("B
+*",sprintf("%032d",$1))));$x=~s/^.{8}//s;}eval($X);
## after perltidy
my $X;
$x =~ s/\s+//g;
while ( $x =~ m/(^.{8})/s ) {
$X = $X . chr( unpack( "N", pack( "B*", sprintf( "%032d", $1 ) ) )
+ );
$x =~ s/^.{8}//s;
}
## commented out eval
#eval($X);
## print instead
#print "$X\n";
## the string itself, minus a bunch of trailing newlines
#!/usr/bin;?erl -w
#use strict;use Tk;my $w=new MainWindow;my $quit=$w->Button(-text=> 'J
+ust Another Perl Hacker',
# -command => sub{exit})->pack();
#&MainLoop;
## after perltidy
#!/usr/bin;?erl -w
use strict;
use Tk;
my $w = new MainWindow;
my $quit = $w->Button(
-text => 'Just Another Perl Hacker',
-command => sub { exit }
)->pack();
&MainLoop;
|
Re^2: Atlas and the Earth
by K_M_McMahon (Hermit) on Feb 14, 2005 at 04:48 UTC
|
jdalbec: I guess the #! line is ignored?
I think I switched/deleted a 0 or a 1 when I was trying to create the ASCII art portion. I have yet to figure out which one I moved, and since it still works, I'm not too worried. :-)
| [reply] |