note
AnomalousMonk
<blockquote><i>
... I'm a little less sure about the first unpack to split the <c>$data</C> scalar into the list of items.
</I></BLOCKQUOTE>
<p>
Can you say more about why you are unsure about this statement? Is it because of the interpolated <c> $entry_size </C> component in the [doc://unpack] template? If so, be assured that this is a perfectly kosher maneuver: a template specification string is just a string no matter how compounded. <small>([href://http://msgboard.snopes.com/message/ultimatebb.php?/ubb/get_topic/f/101/t/000363.html|Sometimes a string is just a string...])</SMALL>
</P>
<p>
<b>Update 1:</B> Changed a word, added a link.
</P>
<p>
<b>Update 2:</B> Hey, this is very late, but I just noticed that the [doc://unpack] documentation includes an example of this <i>exact</I> technique in a limited implementation of [doc://substr]:
<blockquote><i><c>
sub substr {
my($what,$where,$howmuch) = @_;
unpack("x$where a$howmuch", $what);
}
</C></I></BLOCKQUOTE>
</P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-634253">
<hr><p>Give a man a fish<b>:</B> <c> <%-{-{-{-<</C></P>
</div></div>
1212579
1212579