SPUG: itm 60 in effective perl programming
sthoenna at efn.org
Thu Feb 24 14:02:52 PST 2005
On Thu, Feb 24, 2005 at 10:26:30AM -0800, Ben Reser wrote:
> I'm fully aware of what the original is doing. But if it's described as
> joining all the lines in a file it doesn't do that. Just because you
> can use the regex operator to do something doesn't mean it's the most
> efficient. And many times it's not the most readable.
> IMHO this script is seriously bugged. It's misusing the <> operator and
> I'm a bit suprised to hear that it was found in a book titled Effective
The description given by the original poster said "joins lines in a file",
not *all* the lines in a file. The original code does in fact do that,
and in a way that makes it reasonable to suppose that the input file is
known to have an even number of lines.
More information about the spug-list