in reply to Perl 5.10 pack() template modifier "treat signed"

Update: useless parts of posting struck out. Brain fade... sorry :-(

Well, Nn already work big-endian, and Vv work little-endian.

There doesn't seem much point these accepting < or > to override (or reenforce) their meaning -- and a quick experiment shows that they are rejected.

Of course, NnVv work unsigned. There doesn't appear to be a "make signed" qualifier, but you can get signed big-endian and signed little-endian by qualifying sSiIlLqQ to taste.

Replies are listed 'Best First'.
Re^2: Perl 5.10 pack() template modifier "treat signed"
by almut (Canon) on Nov 11, 2008 at 18:04 UTC
    Well, Nn already work big-endian, and Vv work little-endian.

    I'm not interested in changing their endianness, but in making them behave in a signed fashion...

    There doesn't appear to be a "make signed" qualifier

    If so, then why have an entry in the table of modifiers for a modifier which doesn't exist? — That's confusing, at best.

      Apologies. I will write out 100 times, "Engage brain for longer before touching keyboard".

      In mitigation: I was convinced that because 'l<' and 'l>' gave signed 'V' and 'N', respectively, that there was no need for anything else -- and no need for the table to show any qualifier for 'nNvV'. Also I couldn't see much point in forcing 'nNvV' native... but then, in those cases '!' is the very signed qualifier I didn't think existed :-(

      All in all, not a good posting. Sorry.

        No need to apologize... My original post doesn't exactly exhibit deep brain engangement either... :)

        Anyhow, thanks for taking the time to reply!