Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Converting words to numbers with HOP::Parser

by Anonymous Monk
on Mar 29, 2012 at 02:01 UTC ( [id://962291]=note: print w/replies, xml ) Need Help??


in reply to Converting words to numbers with HOP::Parser

What to do?

ok 1 - use Number::FromWord; ok 2 - main->can('word_to_num') ok 3 - ... three should be 3 ok 4 - ... fourteen should be 14 ok 5 - ... forty should be 40 not ok 6 - ... forty-two should be 42 # Failed test '... forty-two should be 42' # at t\01.t line 42. # got: undef # expected: '42' not ok 7 - ... ninety nine should be 99 # Failed test '... ninety nine should be 99' # at t\01.t line 42. # got: undef # expected: '99' ok 8 - ... hundred should be 100 not ok 9 - ... hundred and twenty should be 120 # Failed test '... hundred and twenty should be 120' # at t\01.t line 42. # got: undef # expected: '120' not ok 10 - ... hundred and two should be 102 # Failed test '... hundred and two should be 102' # at t\01.t line 42. # got: undef # expected: '102' not ok 11 - ... negative hundred and two should be -102 # Failed test '... negative hundred and two should be -102' # at t\01.t line 42. # got: undef # expected: '-102' not ok 12 - ... hundred ninety-nine should be 199 # Failed test '... hundred ninety-nine should be 199' # at t\01.t line 42. # got: undef # expected: '199' not ok 13 - ... hundred nineteen should be 119 # Failed test '... hundred nineteen should be 119' # at t\01.t line 42. # got: undef # expected: '119' not ok 14 - ... two hundred and three should be 203 # Failed test '... two hundred and three should be 203' # at t\01.t line 42. # got: undef # expected: '203' not ok 15 - ... twelve hundred and seventy three should be 1273 # Failed test '... twelve hundred and seventy three should be 1273' # at t\01.t line 42. # got: undef # expected: '1273' ok 16 - ... thousand should be 1000 not ok 17 - ... seven hundred thirty-three thousand five hundred and t +wenty-nine should be 733529 # Failed test '... seven hundred thirty-three thousand five hundred +and twenty-nine should be 733529' # at t\01.t line 42. # got: undef # expected: '733529' not ok 18 - ... seventy three point two four five should be 73.245 # Failed test '... seventy three point two four five should be 73.24 +5' # at t\01.t line 42. # got: undef # expected: '73.245' not ok 19 - ... three point seventeen should be 3.17 # Failed test '... three point seventeen should be 3.17' # at t\01.t line 42. # got: undef # expected: '3.17' not ok 20 - ... seven million should be 7000000 # Failed test '... seven million should be 7000000' # at t\01.t line 42. # got: undef # expected: '7000000' not ok 21 - ... two hundred and ninety six million four hundred and tw +enty-two thousand five hundred and seventy eight should be 296422578 # Failed test '... two hundred and ninety six million four hundred a +nd twenty-two thousand five hundred and seventy eight should be 29642 +2578' # at t\01.t line 42. # got: undef # expected: '296422578' not ok 22 - ... two hundred and ninety six million four hundred and tw +enty-two thousand five hundred and seventy eight point three four sev +en should be 296422578.347 # Failed test '... two hundred and ninety six million four hundred a +nd twenty-two thousand five hundred and seventy eight point three fou +r seven should be 296422578.347' # at t\01.t line 42. # got: undef # expected: '296422578.347' 1..22 # Looks like you failed 15 tests of 22.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-29 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found