On Fri, Jun 09, 2006 at 09:18:22AM -0700, Lawrence Statton wrote: > Our local style guide bans the > use of for without an explicit index variable
Every style guide should have a rule that says "break these rules if you consider it sensible to do so, but be prepared to justify your decision", or something to that effect. Especially so if the rules are draconian. Otherwise you'll end up with stuff like # Remove the first space from all thingies use Readonly; use Regexp::Autoflags; Readonly my $SPACE => q{ }; # Single space Readonly my $EMPTY_STR => q{}; # Empty string foreach my $thingy (@thingies) { $thingy =~ s{ $SPACE } { $EMPTY_STR }o; } instead of s/ // for @thingies; or something. Astute readers may recognise the rules I am attempting to use. (Incorrectly, in all probability.) But I am really trying to make a general point rather than pick holes in any particular set of rules. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>