$|=1;@_=;@_=($_[0].$_[1],$_[1].$_[0]
);for(20051231..20060101){print$_[0];sleep
1;print"\010"x length($_[0]);print$_[1];
sleep 1;print"\010"x length($_[1]);}
__DATA__
Happy Year!
New
Happy Year!
New New
Happy Year! Happy Year!
New New
Happy Year! Happy Year!
...
If I run it in an X11 xterm window, I get:
Happy Year!
New
New
Happy Year!
Happy Year!
New
New
Happy Year!
...
If I pipe it to "vi" (actually vim 6.2 here), I get the blink effect I suspect you were looking for (alternating
Happy Year!
New
and
New
Happy Year!
in the top left corner). Is my suspicion correct?
This worked fine under Mac OS 9.
Obfuscated Perl is like Java - write once, test everywhere.
I have removed added a newline Infront of New If that is the ase it is printing only the following
$|=1;@_=;@_=($_[0].$_[1],$_[1].$_[0]
);for(20051231..20060101){print$_[0];sleep
1;print"\010"x length($_[0]);print$_[1];
sleep 1;print"\010"x length($_[1]);}
__DATA__
Happy Year!
New
Happy Year! Happy Year! Happy Year! Happy Year! Happy Year! Happy Year! Happy Year!Why can't you Handle that.
perlmonks.org content © perlmonks.org and jdalbec, jesuashok, TedPride
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03