469,362 Members | 2,287 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Convert Number to Word

rajiv07
141 100+
Hi to all ,

Is any Perl module for converting number to word

Ex. 1-one
2-two

Is any idea please.

Thanks.
Dec 8 '07 #1
9 9416
numberwhun
3,503 Expert Mod 2GB
Hi to all ,

Is any Perl module for converting number to word

Ex. 1-one
2-two

Is any idea please.

Thanks.
Have you gone out to cpan and searched for numbers to words?

You should really try searching yourself before posting as we will quite possibly ask you what your returned.

Regards,

Jeff
Dec 8 '07 #2
Have you gone out to cpan and searched for numbers to words?

You should really try searching yourself before posting as we will quite possibly ask you what your returned.

Regards,

Jeff
I always enjoy seeing the self-righteo, erm... helpful people post 'answers' like this.

The CPAN Search you recommend above returns 415 results, of which the two most appropriate (in my own opinion) _real_ answers (Lingua::EN::Numbers or Lingua::EN::Numbers::Easy ) are not to be found on the first page of results. In fact, Linuga::EN:Numbers::Easy does not show up until page 32, where it is the 315th result and Lingua::EN::Numbers doesn't even make the results list at all.
Feb 27 '08 #3
KevinADC
4,059 Expert 2GB
I always enjoy seeing the self-righteo, erm... helpful people post 'answers' like this.

The CPAN Search you recommend above returns 415 results, of which the two most appropriate (in my own opinion) _real_ answers (Lingua::EN::Numbers or Lingua::EN::Numbers::Easy ) are not to be found on the first page of results. In fact, Linuga::EN:Numbers::Easy does not show up until page 32, where it is the 315th result and Lingua::EN::Numbers doesn't even make the results list at all.
If you wish to elaborate on a suggestion another person made, you should, or correct them if they made a mistake, or show a better way of doing something, those are all welcome and I think appreciated but the condesending attitude is not welcome. Everyone is free to help to the extent they want to, by suggesting a general search of CPAN or specific modules or whatever.
Feb 27 '08 #4
If you wish to elaborate on a suggestion another person made, you should, or correct them if they made a mistake, or show a better way of doing something, those are all welcome and I think appreciated but the condesending attitude is not welcome. Everyone is free to help to the extent they want to, by suggesting a general search of CPAN or specific modules or whatever.

Condescending is exactly how I would have described the original response. Someone asked a simple question and was not told the answer, but instead berated for wasting the time of people on the forum by not bothering to have done due diligence. The irony was that the suggested path to due diligence was to search CPAN and the trouble to provide a link to the search required was gone to... But clearly the responder, a moderator on this forum, had not gone to the due diligence to verify that the suggested search would actually answer the question.

Now, I may have taken exception to such a singularly unhelpful response and further made my opinion on it known. However, I at least did go to the trouble to run the search, find the modules, where they fell in the search results, and direct the original poster (admittedly quite late) to them.

To say that people are free to help to the degree they are willing is all well and good. But the 'help' should actually be help, not condescending reproaches that assume laziness on the part of the original poster. Had I not already have been aware that such a module existed and a vague recollection of its name, I probably would have despaired well before reaching the 31st page of results and resorted to posting on a forum in hopes that someone knew the answer.

Though to be honest, I may well have posed somewhere where I've found help offered in a friendly way in the past, like Perl Monks rather than here.
Feb 27 '08 #5
KevinADC
4,059 Expert 2GB
Condescending is exactly how I would have described the original response. Someone asked a simple question and was not told the answer, but instead berated for wasting the time of people on the forum by not bothering to have done due diligence. The irony was that the suggested path to due diligence was to search CPAN and the trouble to provide a link to the search required was gone to... But clearly the responder, a moderator on this forum, had not gone to the due diligence to verify that the suggested search would actually answer the question.

Now, I may have taken exception to such a singularly unhelpful response and further made my opinion on it known. However, I at least did go to the trouble to run the search, find the modules, where they fell in the search results, and direct the original poster (admittedly quite late) to them.

To say that people are free to help to the degree they are willing is all well and good. But the 'help' should actually be help, not condescending reproaches that assume laziness on the part of the original poster. Had I not already have been aware that such a module existed and a vague recollection of its name, I probably would have despaired well before reaching the 31st page of results and resorted to posting on a forum in hopes that someone knew the answer.

Though to be honest, I may well have posed somewhere where I've found help offered in a friendly way in the past, like Perl Monks rather than here.
I appreciate that you have a high standard of what you define as being helpful. A person that holds himself to a high standard personally could be a great benefit to this forum.

But I can understand Jeffs reply also. We see many many lazy questions posted here and just like you seemed to be sensitive to his type of less than helpful reply, I can see how and why he might be sensitive to what he thinks or believes or assumes (just like you have done in regards to him) that the poster is being lazy and prefers to have others do a search when the poster could have easily done it himself. There is no end to assumption. Asking for clarification is always the better approach on a forum rather than assuming. Written words are too easily misunderstood when trying to read intentions into them that may or may not have been there.

Anyways, I do sincerely hope you stick around here as I am assuming you are going to be helpful and look forward to reading your replies to questions. If you decide not to stick around I wish you all the best.

Kevin
Feb 27 '08 #6
Thank you minowicz for your post!

I had no idea what keywords to search CPAN for this functionality.
Jul 29 '11 #7
pikato
2
hi Rajiv,
I'm not very sure but you may try out this cpan link
http://search.cpan.org/~burak/Task-L...Any/Numbers.pm

Task::Lingua::Any::Numbers

Anyway c u. May u're from cit :)
Dec 5 '11 #8
Hi,

The following two function return the ascii value.I hope this one is useful for you........

$char=chr(48);
print"\n char= $char\n";
$num=ord('1');
print"\n Number= $num\n";
Dec 29 '11 #9
As a "training project", I set myself the task of converting dollar amounts into thealpha string commonly found on checks. The easiest way that I found was a series of hashes in the form:

%small_nums = {1 => ONE, 2 => TWO.... etc.

One hash for 0-9, one for the "teens" and one for the "tens" (TWENTY, THIRTY etc.)

Then just SPLIT the number you are converting and index reference the hashes.

Hope this helps.
Mar 23 '12 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by jerry.ranch | last post: by
2 posts views Thread by Michael Meckelein | last post: by
3 posts views Thread by Jeff Mason | last post: by
2 posts views Thread by Jeff Mason | last post: by
2 posts views Thread by Tom Grove | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.