On Wed, Jan 16, 2002 at 09:51:45PM -0500, Tanton Gibbs wrote:
> Michael brings up a good point...for this problem, you would probably be
> better served by tr
> 
> $stat =~ tr/a-zA-Z//d;
> 
> will delete any alpha character.
> 
> Although split will do the job, I think tr would be a more "idiomatic"
> choice, probably more efficient too.

That might work, except one of his requirements is that the numeric data be
placed into an array.

tr/// is more efficient; I can't really guage its level of idiomicity
compared to split.


> > On Wed, Jan 16, 2002 at 05:38:56PM -0600, Hewlett Pickens wrote:
[snip]
> > >  "$stat" is a string that has alpha and numeric data in it.
> > >  I want to remove all of the alpha and put the numeric data into an array.
[snip]


Michael "Fun with Language" Fowler
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to