B
bad_knee
Hello,
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
Thanks
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
Thanks
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
Hello,
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
Thanks
bad_knee said:(e-mail address removed) (bad_knee) wrote in message news:<[email protected]>...
Sheesh.. thought this would be an easy one for you guys.
bad_knee said:(e-mail address removed) (bad_knee) wrote in message
Sheesh.. thought this would be an easy one for you guys.
(e-mail address removed) (bad_knee) wrote in message
Hello,
I was wondering if anyone had a quick one for "commatizing" a
number in perl?
Thanks
Sheesh.. thought this would be an easy one for you guys.
Oh well, for anyone interested...
$number = "10001324512461346234500";
$sep = ",";
$number =~
s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1$sep/g; print
"num:$number\n";
cheers!
Brian said:By a strange coincidence, I was wonding if "anyone" ever reads the
FAQ.
And as usual, you miss the point that most new people would not have
_knowlege_ of na faq. It's like when ou go to a new place. Say, you move
to a new state, go to a new school, you know not wher anything really
is, you tend to ask around "hey, do you know where I can find this or
that?". You _can't_ expect every new person to know where to find
everything, becuase they may not even know of the exisitance of such a
tool.
Nothing wrong with pointing them ot an FAQ, but chastizing a new person
for not checking an FAQ they may not know about is just plain mean
spirted and absurd (need I mention arrogant?) If you find your self
wanting to post something ill spirited like this it may be better to
just stfu. I dont give a flying crap how helpful you overwise are.
There is nothing wrong with being new. One must start somewhere.
And as usual, you miss the point that most new people would not have
_knowlege_ of na faq. It's like when ou go to a new place. Say, you move
to a new state, go to a new school, you know not wher anything really
is, you tend to ask around "hey, do you know where I can find this or
that?". You _can't_ expect every new person to know where to find
everything, becuase they may not even know of the exisitance of such a
tool.
Sam said:And one starts by reading the documentation for the language,
compiler, software package, whatever it is you are new to. For perl
the FAQ
is a big chunk of that documentation and pretty hard to miss, unless
of course you didn't bother looking at any of the documentation.
So, just short of going to www.perl.org, how is one suppost to know of
perldoc and it's faq's off the bat?
Chris said:Well, if you come to this group, the posting guidelines, posted twice
every week, if you *read* the group before *post* to it, like you
should (remember why the good Lord gave two ears and only one mouth!)
Your points about the difficulty of finding perldoc are well taken.
But it doesn't excuse clueless posts, because people who have found
this newsgroup have found the key to finding perldoc if they will
*read*.
Wally said:Twice a week? I have seen them posted at all the last few months. I
have been through 3 different isp's so that is not limited to just my
news service. Wehre is this being posted from? Under what name?
Wally said:Twice a week? I have seen them posted at all the last few months. I
have been through 3 different isp's so that is not limited to just
my news service. Wehre is this being posted from? Under what name?
Wally said:Twice a week? I have seen them posted at all the last few months. I have
been through 3 different isp's so that is not limited to just my news
service. Wehre is this being posted from? Under what name?
If it doesn't show on your server, it can only be because your serverWell if other people cannot see the faq being posted as you say, jsut
like it does nto show on my server, then that too is a broken bridge
that cannot be crossed, and would also exaplin why some newbies seem to
give blank stairs when asked why they didnt read it.
Actually, the whole situation is like this: Perl is like a software
package from a store that has a nice manual that under a hidden panel.
you don't know it's there unless you KNOW it's there.
Someone who is starting will likely not even of heard of "perldoc".
If they are unixsavy they might try something like: $ perl --help | grep
doc
Which doesn not return anything. `$ perl --help` by it self does nothing
to guide you to the docs.
Even grepping the man page for perl doesn't ofer much:
$ man perl | grep doc
perltoc Perl documentation table of contents
perlpod Perl plain old documentation
Extensive additional documentation for Perl modules is
this additional documentation in the
additional documentation is distributed standard with
Perl, but you'll also find documentation for third-party
You should be able to view Perl's documentation with your
So a newbie might be inclined to try
$ perltoc
bash: perltoc: command not found
And `$ man perl | grep perldoc` return nothing, but the point is they
have to first KNOW of perldoc.
$ man perl | grep help
you're not sure where you should look for help, try the -w
Larry Wall <[email protected]>, with the help of oodles of
help to others who wish to advocate the use of Perl in
help mail in a bug report.
This could bery well lead
$ help perl
bash: help: no help topics match `perl'. Try `help help'.
Many newsbies could of installed some linux distro that came with Perl
and they decide on exploring it. Looking for documentation seems to be
more then a trivial task.
So, just short of going to www.perl.org, how is one suppost to know of
perldoc and it's faq's off the bat?
man perlfaq said:It's not a question of a newsgroup being like a coutry or whatever, but
the lack of self advertising of perldoc it self. The fact thast there is
no mention of it in the man page doing simple greps is unacceptable.
Expecting someone to of read documentation thats buried in a way that
you didnt even know it was there in the "box" is what is unacceptable.
Now that I think about it, I never even heard of perldoc until I first
read this group a good some time ago.
Sam Holden ([email protected]) wrote on MMMDCCXXVIII
September MCMXCIII in <URL:;;
;; School's tend not to have FAQs, so that's a pretty stupid analogy.
I can't recall in my many years of getting an education to have attended
a school without a student guide full of frequently needed information.
Chris said:Tad McClellan posts it, regular as clockwork. Which may explain why
he sometimes gets a mite testy when it seems nobody reads it.
Eight times in the past month. I've accessed the newsgroup from
several different ISPs and Google, and they've always been there.
Not sure how you missed it.
If it doesn't show on your server, it can only be because your server
is broken, which is scarcely the fault of the Perl documentation or
its maintainers.
Wally Sanford ([email protected]) wrote on MMMDCCXXX September
MCMXCIII in URL:
No, if they are Unix savy, they try "man perl", and guess what? On the
second page it mentions the FAQ!
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.