SPUG: pack and unpack

dleonard at dleonard.net dleonard at dleonard.net
Thu Aug 28 19:20:32 CDT 2003


pack and unpack are totally perl-ish.  They fit so well in the TMTOWTDI
philosophy.  They are so great they pretty much document themselves.  I
like using them almost as much as splice.  Not many other languages can do
so much with so little code in such an elegant fashion.

I'll take pack and unpack any day over a complex regex with backreferences
and the like.

-- 

<Douglas Leonard>
<dleonard at dleonard.net>

On Wed, 27 Aug 2003, Andrew Sweger wrote:

> On Wed, 27 Aug 2003, Richard Wood wrote:
>
> > Surely there are many pack/unpack experts out there in SPUG-land.
>
> There are, but they are few and far between. pack/unpack are a pair of the
> more inscrutable functions built into perl. It's a down-and-dirty,
> hands-on-the-metal kind of interface that just does not feel very
> Perl-ish; a necessary evil, if you will. I typically surround code
> containing these functions with a barricade of cinder block-like comments
> (lines of #'s):
>
> ######################################################################
> ######################################################################
> ##### DANGER DANGER    -   Avert your eyes   -    DANGER DANGER ######
> ######################################################################
> ######################################################################
>
> (Wait, an evil idea has just ignited in my brain. Must find extinguisher.)
>
> --
> Andrew B. Sweger -- The great thing about multitasking is that several
>                                 things can go wrong at once.
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
> WEB PAGE: http://www.seattleperl.org
>




More information about the spug-list mailing list