Re: Help! Strings -> Numbers
[email protected] (Luke Palmer) Fri, 22 Nov 2002 11:59:16 -0700 (MST)
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
> Date: Fri, 22 Nov 2002 10:49:08 -0800 > From: Michael Lazzaro <[email protected]> > > Or, using hypothetical vars: > > $s ~~ s/ $num := <number> /$num.as(MoneyFormat)/; > > (This is a bit off-topic, but it's a tiny bit sad that you can name > subrules, but you can't refer to them by name in the interpolation > unless you use hypothetical vars. Eh, no biggie: it would introduce > too many problems to allow it.) IIRC, that's not true. I believe this is alive and DWIMmy: $s ~~ s/ <number> /$number.as(MoneyFormat)/; I know this is: s/ <number> <( $number < 200 )> / Luke