[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Setting a variable to a string match



At 19.28 +0200 99-05-28, Darryl Tang wrote:
>Is this the most efficient way to accomplish this task?  Seems like there
>should be a more efficient way.

It's completely OK. I'd change {0,} to + and put it in one line:

my ($price) = $line =~ /\$(\d+.\d\d)/;

Regards,
Cajo.

___Carl_Johan_Berglund_________________________
   Adverb Information
   carl.johan.berglund@adverb.se
   http://www.adverb.se/



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org