Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Atlas and the Earth

by jdalbec (Deacon)
on Feb 14, 2005 at 02:23 UTC ( #430669=note: print w/replies, xml ) Need Help??

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;

Replies are listed 'Best First'.
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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430669]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-10-05 02:03 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (20 votes). Check out past polls.