Perl Pack Unpack Printf Sprintf Cheat Sheet

2,831
-1

Published on

Made at http://www.catonmat.net

Cheat sheet contains all the predefined/special variables of Perl. They have been collected form `perldoc perlvar' manual page.

Visit http://www.catonmat.net for more cheat sheets!

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,831
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Perl Pack Unpack Printf Sprintf Cheat Sheet

  1. 1. Perl pack/unpack Summary Usage: • pack TEMPLATE, LIST • unpack TEMPLATE, EXPR Template parameter summary: Parameter Description a A string with arbitrary binary data, will be null padded. A A text (ASCII) string, will be space padded. Z A null terminated (ASCIZ) string, will be null padded. b A bit string (ascending bit order inside each byte, like vec()). B A bit string (descending bit order inside each byte). h A hex string (low nibble first). H A hex string (high nibble first). c A signed char value. C An unsigned char value. Only does bytes. See U for Unicode. s A signed short value. An unsigned short value. (This 'short' is _exactly_ 16 bits, which may differ from what a local C compiler calls S 'short

×