[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

RE: [p5p] pod bugs



From: Tom Christiansen [mailto:tchrist@chthon.perl.com]
> I think what we're getting down to is that $/ = '' is a problem.
> Nobody ever understands what it really means, and constantly 
> tries to rehack programs that use it.

I think this is the crux of things. Specifically, from perldoc perlvar

    $/      The input record separator, newline by default. This is used
            to influence Perl's idea of what a "line" is. Works like
            awk's RS variable, including treating empty lines as
            delimiters if set to the null string. (Note: An empty
            line cannot contain any spaces or tabs.)

That note is the key. Maybe the simple answer is "just" to change the effect
of $/='' to split on empty lines, where empty matches /^\s*$/ rather than
just /^$/.

Excuse me while I go and sacrifice 14 chickens, 2 goats and an elephant to
the Compatibility Police, to return them to their slumber....

Paul.


Follow-Ups from:
Andy Dougherty <doughera@lafayette.edu>
Nick Ing-Simmons <nik@tiuk.ti.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]