Re: Scoping of $/

2005-05-10 Thread Larry Wall
On Tue, May 10, 2005 at 05:24:30PM -0400, Rick Delaney wrote: : On Tue, May 10, 2005 at 06:20:44AM -0600, Luke Palmer wrote: : > Yeah, they're lexical, just like in Perl 5. : : Not just like Perl 5, I hope. If it was then the above would print : "d". Yes, Perl 5 actually uses an autolocalizing f

Re: Scoping of $/

2005-05-10 Thread Rick Delaney
On Tue, May 10, 2005 at 06:20:44AM -0600, Luke Palmer wrote: > On 5/10/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: > > Hi, > > > > sub foo() { say $1;# undef? > > "abc" ~~ /^(.)/; # $1 now "a" > > } > > > > sub bar() { > > "def" ~~ /^(.)/; # $1 now "d"

Re: Scoping of $/

2005-05-10 Thread Luke Palmer
On 5/10/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: > Hi, > > sub foo() { > "abc" ~~ /^(.)/; # $1 now "a" > } > > sub bar() { > "def" ~~ /^(.)/; # $1 now "d" > foo(); > say $1;# Outputs "d" > } > > bar(); > > # Correct (I hope so)? Yeah, they're

Scoping of $/

2005-05-10 Thread Ingo Blechschmidt
Hi, sub foo() { "abc" ~~ /^(.)/; # $1 now "a" } sub bar() { "def" ~~ /^(.)/; # $1 now "d" foo(); say $1;# Outputs "d" } bar(); # Correct (I hope so)? --Ingo -- Linux, the choice of a GNU | Row, row, row your bits, gently down t