No such thing as a small change | |
PerlMonks |
Re^2: Modifying pos() from within (?{...})by mxb (Pilgrim) |
on Apr 26, 2018 at 14:23 UTC ( [id://1213611]=note: print w/replies, xml ) | Need Help?? |
Thanks for your help also!
Wow, that's concise and reasonably clear. I'm learning regex and more advanced pack|unpack at the same time so it's definitely something I need to dig into deeper. Armed with the pack documentation I dissected your pack string into the following:
It seems that I need to go through perlpacktut next! I do have a small question however, when I try to repeat the group with * I get the following error: 'x' outside of string in unpack Maybe this is something to do with the x at the start of the group? It's trying to read a new group starting just past the end of the string? edit:Changing the first part of the pack string to L seemed to fix the 'outside of string' error. The data length is now explicitly within the returned values, but could be ignored later. edit2:I span this out into a separate thread as it was getting too far off the original topic.
In Section
Seekers of Perl Wisdom
|
|