in reply to Byte-order and packing numbers into strings

This seems to work. At least it produces the same as your code...
sub bbo_32 {pack'VN',$_[0],$_[0]}
update:
When I first started out with perl I found that pack and unpack were menacing frightful things that I was never willing to spend time to grok. However it turns out that they are a lot easier than they look, just take the time to mess around with em. Very useful in a lot of places and ways. Which is not to say that I know them that well. I still use perlfunc pretty much every time I need to use either.

Yves / DeMerphq
--
When to use Prototypes?

Replies are listed 'Best First'.
Re^2: Byte-order and packing numbers into strings
by tadman (Prior) on Jan 24, 2002 at 23:09 UTC
    To further golf this, you could do the following:
    sub bbo_32 {pack'VN',@_[0,0]}
    Which is a low-tech add on to an elegant solution by demerphq.

    Update: demerphq points out $_[0,0] to the correct @_[0,0]. Cut and paste error.
      Nice! ++ for sure! (Well, overlooking that it should be @_[0,0] ;-)

      Similar in length is also

      sub bbo_32{pack'VN',(pop)x2}

      Yves / DeMerphq
      --
      When to use Prototypes?