- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

Character in 'W' format wrapped in pack

(W pack) You said

pack("U0W", $x)

where $x is either less than 0 or more than 255. However, U0-mode expects all values to fall in the interval [0, 255], so Perl behaved as if you meant:

pack("U0W", $x & 255)
ISBN 9781906966027Perl Language Reference ManualSee the print edition