Help for this page

Select Code to Download


  1. or download this
    # there's some looseness here to account for people's mangling
    # of the English language
    
    ...
    
    ones           ::= zero | one  | two   | three | four
                     | five | six  | seven | eight | nine
    
  2. or download this
    package Number::FromWord;
    
    use warnings;
    ...
    }
    
    1;
    
  3. or download this
    #!perl 
    
    #use Test::More tests => 1;
    ...
        my ( $word, $num ) = splice @words, 0, 2;
        is word_to_num($word), $num, "... $word should be $num";
    }