http://qs321.pair.com?node_id=314660


in reply to Re: HTML::Template question - tmpl_if
in thread HTML::Template question - tmpl_if

Actually perl doesn't mid a bit if you have too many commas in a list, and in fact I've heard monks advocate a trailing comma to make it easier later to expand the list. I avoid doing it myself but mostly for aesthetic reasons.

use strict; use warnings; my @list = ('foo', 'bar',,,,'baz',,,,); print "Item $_\n" for @list; print "Length " . scalar @list."\n";
Note that perl even gets the length of the array correct.


"The dead do not recognize context" -- Kai, Lexx

Replies are listed 'Best First'.
Re: Re: Re: HTML::Template question - tmpl_if
by punkish (Priest) on Dec 14, 2003 at 18:48 UTC
    I stand corrected. And, I agree with you -- since I have always left the trailing comma out, I will continue to leave it out. Aesthetically it is more pleasing, and logically it achieves a closure. Good for the heart and the mind.