Lingua::Pangram

Tony Bowden tony at kasei.com
Wed Jan 23 08:34:17 CST 2002


On Wed, Jan 23, 2002 at 02:14:23PM +0000, Steve Rushe wrote:
> On Wed, Jan 23, 2002 at 01:51:56PM +0000, Marty Pauley wrote:
>> To start, a modified version of Russell's code at 74 strokes:
>>> Well a tad shorter, just by rearranging

Same algorithm, shorter version:


MP: perl -wnle 'sub p{for("a".."z"){return()unless$_[0]=~/$_/i}1}p($_)&&print'
SR: perl -wnle 'sub p{for("a".."z"){return()unless$_[0]=~/$_/i}print}p($_)'
TB: perl -wnle 'sub p{for("a".."z"){$_[0]=~/$_/i||return}print}p($_)' 

Tony




More information about the Belfast-pm mailing list