Piers Cawley wrote:
> If I replace C<< ($key, $val) >> with
>
> @ary = m/<$pattern>/
>
> and the match succeeds, how many elements are there in @ary?
Zero. No explicit captures in that pattern.
> Suppose you want to use a hypothetical variable to bind a name to
> a capture
Piers Cawley wrote:
> Unless I'm very much mistaken, the order of execution will
> look like:
>
> $2:=$1; $1:=$2;
You're not binding $2:=$1. You're binding $2 to the first
capture. By default $1 is also bound to the first capture.
Assuming that numbered variables aren't special, the orde
On 31 Aug 2002 at 10:26, Piers Cawley wrote:
> > my $pattern = rx:w / $1:=(\S+) = $2:=(\S+) |
> > $2:=(\S+) = $1:=(\S+) /;
>
> Count the capturing groups. Looks like there's 4 of 'em to me. $1, $2,
> $3 and $4 are automatic variables which, according to the Apocalyp
On 31 Aug 2002 at 0:17, Piers Cawley wrote:
> my $pattern = rx:w / $1:=(\S+) = $2:=(\S+) |
> $2:=(\S+) = $1:=(\S+) /;
>
> @ary = m/<$pattern>/
>
> how many elements are there in @ary? I can
> make a case for 4 quite happily. Certainly that's what A5 seems to
Dan Sugalski:
# I've checked a draft copy of Apocalypse 5 into the repository. It'll
# get yanked once the final is released (and I think we may start
# checking in the final apocalypses and exegeses, but that's for later)
# but it's there now.
#
# Please note: This is so we can start writing
Folks,
I've checked a draft copy of Apocalypse 5 into the repository. It'll
get yanked once the final is released (and I think we may start
checking in the final apocalypses and exegeses, but that's for later)
but it's there now.
Please note: This is so we can start writing the regex parser.
If I apply the global_setup change it works a touch better...
Dan
--"it's like this"---
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and ev