Perl Programming/Keywords/unpack
< Perl Programming | Keywords
The unpack keywordEdit
unpack does the opposite of pack by taking a string and expanding it out into a list of values. (In scalar context, only the first value produced is returned.)
SyntaxEdit
unpack TEMPLATE, EXPRESSION
unpack TEMPLATE
ExampleEdit
my($what, $where, $howmuch) = @_;
unpack("x$where a$howmuch", $what);