|Just another Perl shrine|
[SOLVED] Pack/unpack - understanding the '@' and '.' templactesby ateague (Scribe)
|on Mar 30, 2013 at 19:14 UTC||Need Help??|
ateague has asked for the
wisdom of the Perl Monks concerning the following question:
UPDATE: I got my example to work with the following code:
Thank you Loops and 7stud for your help.
Good morning! I am trying to get a better understanding of Perl's pack/unpack function.
I have a pretty good grasp of the "standard" templates, but I simply cannot get my head around the "@" and "." templates.
Does anyone know of (or have) any tutorials/examples that delve more in depth with the "@" and "." templates? perldoc pack and perlpacktut have the briefest mention of "@" and (to my eyes) no mention of ".".
A more concrete example: After playing around with pack and the "/" modifier, I came up with the following:
1. I understand what C/xa is doing, but what does @ do in this case?
2. How would I make the template skip from the absolute start of the string, rather than from a relative position?
Thank you for your time.