[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Cool hack of the week




> Try as I may, I fail to find a four- or five-line locution there! 

No doubt your powers are at low ebb due to the late hour.  In the
morning it will be obvious that if you write this code with the usual
line-breaking conventions, it is four lines long.

I am not making this up.  Three-line versions of this locution appear
on page 248 of the Perl Cookbook, in perlfaq5, and in perlfaq8.  These
versions are incomplete because they fail to provide correct scope to
the temporary variable.  If they were complete, they would each be
four or five lines long.

> Talk about mountains and molehills...

If you don't like it, you don't have to use it.  But if you think I'm
making mountains out of molehills by inventing an unneccessary
->autoflush() feature, I suggest you direct your criticism to the
person originally responsible for including an ->autoflush() method in
Perl's standard distribution six years ago.  His name is Larry Wall.

My only contribution here was to show how to enable this function
*without* loading 100Kb of other modules.  If your criticism is that
loading 100Kb of other modules is a molehill, I respectfully disagree.


==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org