Re: Help! Strings -> Numbers
[email protected] (Dave Storrs) Fri, 22 Nov 2002 12:20:47 -0800
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Nov 22, 2002 at 12:10:11PM -0800, Michael Lazzaro wrote: > On Friday, November 22, 2002, at 10:59 AM, Luke Palmer wrote: > >> From: Michael Lazzaro <[email protected]> > I've been under the impression that the following would _not_ work: > > $s ~~ /<number>/; > print "I found $number"; As a minor nit...I think this should work, it just won't do what you wanted. It should do just what it does in P5--print the currently-scoped value of the variable which happens to be named $number...and if there is no such variable, it will throw a warning/error and put in a ''. --Dks