Re: Perl best practices (was: question ... Split operator in Perl)

2007-09-14 Thread Kevin D. Clark
Bill Ricker writes: > I highly recommend Damian Conway's book of same title, "Perl Best > Practices", which recommends a much tamer, consistent readable style > within a workgroup than he uses in his own code (depending on context) > -- he suggests one style but encourages each group to decide fo

Re: Perl best practices (was: question ... Split operator in Perl)

2007-09-14 Thread Bill Ricker
I highly recommend Damian Conway's book of same title, "Perl Best Practices", which recommends a much tamer, consistent readable style within a workgroup than he uses in his own code (depending on context) -- he suggests one style but encourages each group to decide for themselves and take his list

Re: Perl best practices (was: question ... Split operator in Perl)

2007-09-13 Thread Ben Scott
On 9/13/07, John Abreau <[EMAIL PROTECTED]> wrote: >> s/^[\x20\t]*//; # trim leading space >> s/[\x20\t]*$//; # trim trailing space > > Any particular reason to use [\x20\t] instead of \s ? \s would also eat newlines and similar. At a minimum, it would have to explicitly print with "\n" and use

Re: Perl best practices (was: question ... Split operator in Perl)

2007-09-12 Thread John Abreau
On Wed, September 12, 2007 9:37 pm, Ben Scott said: > s/^[\x20\t]*//; # trim leading space > s/[\x20\t]*$//; # trim trailing space > Any particular reason to use [\x20\t] instead of \s ? -- John Abreau / Executive Director, Boston Linux & Unix IM: [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAI

Perl best practices (was: question ... Split operator in Perl)

2007-09-12 Thread Ben Scott
On 9/12/07, Paul Lussier <[EMAIL PROTECTED]> wrote: >> You don't need to put parenthesis around arguments to split, and you >> don't need to explicitly specify the default pattern match target >> ($_). > > Unfortunately, you both "don't *need* to" and "*can* do" anything in > perl. Often at the