Gossamer Forum
Home : General : Perl Programming :

Comma in the count

Quote Reply
Comma in the count
I originally posted a question about adding commas in the grandtotal to the wrong forum
http://www.gossamer-threads.com/...?post=163396;#163396
sorry about that!

Anyway Alex responded with the correct code snippet. The problem I am having is that I do not know where to put this?

Code:
sub commify {
local $_ = shift;
return 0 unless defined $_;
1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
return $_;
}
Any help would be appreciated.

Quote Reply
Re: [jgkiefer] Comma in the count In reply to
This should go in the Links SQL forum.
Quote Reply
Re: [RedRum] Comma in the count In reply to
I had it there and was told to post it here.
Pirate
Quote Reply
Re: [jgkiefer] Comma in the count In reply to
I just read the thread and didn't see where Alex told you to post it here.

It's just that by asking where you should put that code, many people won't know what you mean, whereas posting in the Links SQL forum allows Links SQL users to help you out.

When Alex said "...from the PerlFAQ", he didn't mean you should ask the question in the perl forum

Last edited by:

RedRum: Oct 15, 2001, 10:51 AM
Quote Reply
Re: [RedRum] Comma in the count In reply to
When I read the post
http://www.gossamer-threads.com/...?post=114027;#114027 in THIS forum I thought it was the correct forum.
Seems with all this back and forth, it would have just been easier to answer the darn question. or at least be honest and say you don't know.
I will take this question back to the other forum. thanks anyway.
Unsure
Quote Reply
Re: [jgkiefer] Comma in the count In reply to
I was only trying to help you get a faster answer by telling you to go back to the original thread.

The solution requires a globals tag.

Last edited by:

RedRum: Oct 15, 2001, 3:09 PM
Quote Reply
Re: [RedRum] Comma in the count In reply to
Thank you. I am sorry for the sound of my previous post. I am very grateful that these forums are here, and appreciate your help.

Angelic