Y
yl
Could anyone help explain this line of code?
$_->[/^(?>(.)?(.)+.*)(?!\1)(??{print(($1..$2)[15,4,17,11])})/]
I think it can be divided into 3 parts
1. (?>(.)?(.)+.*)
2. (?!\1)
3. (??{print(($1..$2)[15,4,17,11])})
and the 3rd part will print 'PERL'. But I got no idea how the variables
$1 and $2 was decided to form an array including 'A'..'Z' (though $2 is
not 'Z').
Another question is that $_ is undef at program start, how could it
become an array reference?
Thanks.
$_->[/^(?>(.)?(.)+.*)(?!\1)(??{print(($1..$2)[15,4,17,11])})/]
I think it can be divided into 3 parts
1. (?>(.)?(.)+.*)
2. (?!\1)
3. (??{print(($1..$2)[15,4,17,11])})
and the 3rd part will print 'PERL'. But I got no idea how the variables
$1 and $2 was decided to form an array including 'A'..'Z' (though $2 is
not 'Z').
Another question is that $_ is undef at program start, how could it
become an array reference?
Thanks.