How do you write binary data with Perl in an easy and efficient way on multiple platforms without losing your sanity or having to figure out if the architecture is big or little endian or how wide an integer is.

< ^ >

    pack();
    pack();