Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Battle script

by vladb (Vicar)
on Jun 06, 2002 at 13:01 UTC ( #172173=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $max_lines = 100;
    . . .
    ...
      # do stuff
      . . .
    }
    
  2. or download this
    my $playera = 100;
    my $playerb = 100;
    ...
      die (($playera < $playerb) ? "player A lost!" : "player B lost!") 
        if ($playera < 0 || $playerb < 0);
    }
    
  3. or download this
    player A HP | player B HP
    94.0023803710938 | 99.3478393554688
    ...
    2.77679443359375 | 0.14801025390625
    -1.7657470703125 | -7.55615234375
    player B lost! at temp.pl line 11.
    
  4. or download this
    $"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+)
    +-.*)$/;
    $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print"
    +- $1"}&&`rm $1`;
    print$\;}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-08-02 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (28 votes). Check out past polls.

    Notices?