Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Friday, March 30, 2012

Perl use

use takes effect as soon as it is compiled - even before BEGIN, or more precisely, before any BEGIN blocks that are read after it, because use is effectively inside its own BEGIN block.

And as the documentation points out (I now notice) this is why you can't skip a use by putting it in the false branch of an if. There is a use if pragma for this purpose instead. Or you could use require.

I shall be thinking of use as a compiler directive from now on.

Followers

Blog Archive