in reply to Re^2: unpack in incrementing variables
in thread unpack in incrementing variables

I think people were inclined to show the how because the why is in the docs:

unpack TEMPLATE,EXPR
"unpack" does the reverse of "pack": it takes a string and expands it out into a list of values. (In scalar context, it returns merely the first value produced.)

But I did it because i hadnt had my coffee before I posted (was waiting for it finish being made) and didnt read the question properly. Luckily the coffee was finished just after I hit submit so I realized the error and fixed it right after. :-)

---
$world=~s/war/peace/g

Replies are listed 'Best First'.
Re^4: unpack in incrementing variables
by GrandFather (Saint) on Oct 14, 2005 at 10:31 UTC

    Funny how one can read the docs and see what one wants to see. I read that a day ago when I was trying to figure the problem out and thought "I yes, a number is stored as a string of bytes so that should be fine". Argh.


    Perl is Huffman encoded by design.