D
dolpho37
All,
On page 191 of Perl Cookbook you find this code snippet:
$n = " 49 here";
$n =~ s/\G /0/g;
print $n;
00049 here
Under discussion is \G matching the last position by virtue of /g
match option being present. What I'm having a hard time understanding
is why the pattern '\G ' doesn't match the space between the '9' and
'h' of '49 here'. Can someone help me out? Thanks in advance.
Kind regards,
Dolpho37
On page 191 of Perl Cookbook you find this code snippet:
$n = " 49 here";
$n =~ s/\G /0/g;
print $n;
00049 here
Under discussion is \G matching the last position by virtue of /g
match option being present. What I'm having a hard time understanding
is why the pattern '\G ' doesn't match the space between the '9' and
'h' of '49 here'. Can someone help me out? Thanks in advance.
Kind regards,
Dolpho37