Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Threaded JAPH

by K_M_McMahon (Hermit)
on May 16, 2005 at 02:19 UTC ( [id://457334]=obfuscated: print w/replies, xml ) Need Help??

This might not run right without the latest perl version (with thread support)
#!/usr/bin/perl -w use strict;use threads;use Time::HiRes('sleep'); $| = 1;my @j=('creaJ','klrnu','e os','rHPtt','!aeh '); my (%d);foreach (@j){$d{$_}=threads->create('x',$_);}foreach (@j){my $x=$d{$_}->join();}sub x{my $i=shift;my $t;while($t=substr($i,-1,1)){ print $t;chop($i);sleep(.1);}return($_);}



-Kevin
my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}

Replies are listed 'Best First'.
Re: Threaded JAPH
by K_M_McMahon (Hermit) on May 16, 2005 at 21:09 UTC
    Just found out that this doesn't run properly on a Mac run OS X 10.3.9 (running perl 5.8.1 with ithreads support). To make it run properly Remove the Hi-Res part. It runs slower, but at least it works! Anyone else have problems with it printing out of order (and on what OS/Perl version)?
    #!/usr/bin/perl -w use strict;use threads; $| = 1;my @j=('creaJ','klrnu','e os','rHPtt','!aeh '); my (%d);foreach (@j){$d{$_}=threads->create('x',$_);}foreach (@j){my $x=$d{$_}->join();}sub x{my $i=shift;my $t;while($t=substr($i,-1,1)){ print $t;chop($i);sleep(1);}return($_);}


    -Kevin
    my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}
Re: Threaded JAPH
by cristian (Hermit) on May 17, 2005 at 14:08 UTC
    - With all you respect
    - Modificated Obfu
    - More Obfuscated and few Chars && Vars
    use threads;use Time::HiRes 'sleep'; $|=1;@_=('creaJ','klrnu','e os','rhPtt',',aeh '); push@,,threads->create('_',$_)for@_; $_->join()for@,; sub _{while($_[0]=~/(.)$/){print $1;chop$_[0];sleep.1}}
      Personally I like to make my obfus work with warnings on and while using strict! But hey, that's just me.


      -Kevin
      my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://457334]
Approved by ktross
Front-paged by mattriff
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2025-01-14 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (38 votes). Check out past polls.