Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Perl plays Pong!

by cfreak (Chaplain)
on Jan 25, 2004 at 07:20 UTC ( [id://323941]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl plays Pong!
in thread Perl plays Pong!

This should fix it (untested)

#!/usr/bin/perl $@='Just Another Perl Hacker';$@=length($@); $|=abs(2-$@);goto f;z:if(int(rand(10))>5){($- ,$.)=($",$;);}else{($-,$.)=($",$;);}@b =();$b [0] = $-;if($- ==$;){$b[1]=1;}else{$b[1]=7 + 50 + 10 + (5 * 2);}$,='l';$,='r'if$-==$";$vd ='u';$vd='d'if int(rand(10))<5;while($|){my $s="";foreach $%(0 .. 22){foreach$=(0 .. 78) {if($===39){$s.="|";}if($%==$;&& $===0){$s.= "]";}elsif($===$b[1]&& $%==$b[0]){$s.= "*";} elsif($===78&& $%==$"){$s.="[\n";}elsif($=== 78){$s.=" \n";}else{$s.=" ";}}}print $s;#### $b[1]==1 and$,='r';$b[1]==77 and$,='l';$b[0] == 23 and$vd='u';$b[0]==0 and$vd='d';if($,eq 'r'){$b[1]++;$mp=\$";}if($, eq'l'){$b[1]--;# $mp=\$;;}if($vd eq'u'){$b[0]--;$$mp-- unless $$mp==0;}if($vd eq'd'){$b[0]++;$$mp++ unless $$mp == 22;}select $`,$`,$`,.05;system($^);} f:$^='clear';$"=int(rand(22));$;=int(rand(22 ));$^='cls'if$^O=~m|(?!cyg)win|i;goto z;####
Lobster Aliens Are attacking the world!

Replies are listed 'Best First'.
Re: Re: Re: Perl plays Pong!
by ysth (Canon) on Jan 25, 2004 at 07:41 UTC
    You need (?<!cyg)win. What you have matches three characters that are "win" and aren't "cyg" :)
Re: Re: Re: Perl plays Pong!
by Mr. Muskrat (Canon) on Jan 26, 2004 at 04:05 UTC
    One would usually just search for Win32.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-24 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found