in reply to 'packlist'/'unpackstring' in XS

XS for implementing these code: @data = unpack "C*", $script;

How much do you know about C?

Because the "equivalent of the above code in C makes no sense. A C string is already an array of bytes.

You don't need to pack or unpack a string(array of unsigned char), just access the elements.

If you do not understand enough C to understand that, you should think twice about using XS; cos it'll bite you in the arse. Hard.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.