in reply to How can I avoid code repetition here

I'm not sure if this will help or hurt, but it seems to me that the more natural ordering of your arguments would be ($lchompstr, $optional_string_arg), since that would mirror the syntax of split, unpack, and others that act on $_ by default.

print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))

Replies are listed 'Best First'.
Re^2: How can I avoid code repetition here
by rovf (Priest) on Oct 08, 2009 at 09:41 UTC
    the more natural ordering of your arguments would be ($lchompstr, $optional_string_arg)

    In hindsight you are right. Unfortunately we already have other functions in use, which have the ordering in the way may lchompx is going to be used, and I don't know yet whether I'll have the nerves to change all these consistently. Maybe I'll do one day, and certainly I would do it in the way you propose, if I had to develop all this again.

    -- 
    Ronald Fischer <ynnor@mm.st>