i've just now gotten around to playing with curses, so here's a peak at what i'm going to be wasting my time with for the next few weeks. (:
#!/usr/bin/perl
use Curses;$l.=<DATA>;$i=pack("h*","$l");initscr;refresh;
qwer("$i");$_=$i;$_=~y.[a-z].0.d;s.\s+?..g;chomp;
addstr 1,49,"$_ me!";refresh;endwin;exit(0);nodelay 1;
sub qwer{$_=shift;$c=0;while($c!=length){map{addstr$c,$c,$_;
move$c,$c;select undef,undef,undef,0.050;refresh;$c++;}split//;}};;;
__DATA__
a45737470214e6f64786562702055627c602841636b65627
Update: according to
marcus, this obfu doesn't like mac 's and/or macperl. if anyone can figure a way to fix it, be my guest ): (i don't have a mac on which to try it, myself)
Update(2): i forgot to mention it earlier (sorry) but this code is largely inspired by both of these cool(!!) nodes:
Foochre's
Use the arrow keys (brilliant!) and
jaldhar's
Running with Scissors - a good, simple working model of how perl handles curses. (i was never very keen on them with C, but this cleared up some things with both languages)
--
strfry()
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.