But that wasnt the question man =)
you print '230107312001,32,192,239'

but the question was to just have: '32,192,239'
and you're clobbering the original values which isnt always nice

-10 cookie points! ;-)


----- Original Message -----
From: "Me" <[EMAIL PROTECTED]>
To: "Jos Boumans" <[EMAIL PROTECTED]>; "John Edwards"
<[EMAIL PROTECTED]>
Cc: "'Alex Nelson'" <[EMAIL PROTECTED]>; "Perl Beginners (E-mail)"
<[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 12:16 AM
Subject: Re: removing ASCII characters from array


> > > $data = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239";
> > >
> > > @array = $data =~ /=(\d*)/g;
> > >
> > > print "$array[0], $array[1], $array[2]\n";
>
> > and for esthetics:
> >
> > print join ',' @array;
> >
> > timtowtdi =)
>
> Or
>
>     $_ = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239";
>     s/[^\d,]//g;    # remove all but digits and commas
>     print;
>
> Indeed, timtowtdi :>
>
>

Reply via email to