Ricardo SIGNES > Games-Dice > roll

Download:
Games-Dice-0.043.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

roll - Command line interface for dice rolls

VERSION ^

version 0.043

SYNOPSIS ^

    # Evaluate these command line params
    roll 3d6 2d8

    echo "5d6" > f
    echo "2d4+1" >> f

    # Read the contents of 'f' from STDIN
    roll < f

    # Evaluate 1d100 and open file 'f'
    roll d% f

OVERVIEW ^

This is a command line interface to the Games::Dice library. It takes die rolling specifications in the form of adb[+-*/b]c.

(This specification may change a bit over time, but not radically.)

The optional end modifies the sum of the rolls. 'b' means take the "best" c rolls and sum them. Also '/' truncates the result to an integer after division.

Dice specifications can be piped in, given on STDIN or as positional parameters from the command line.

If a positional parameter matches a file name, it will be opened and each line of the file evaluated.

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 1999 by Philip Newton.

This is free software, licensed under:

  The MIT (X11) License
syntax highlighting: