in reply to Re: How do I combine SPLIT with trimming white space
in thread How do I combine SPLIT with trimming white space

  do { s/^\s+//; s/\s+$//; } for $entry;

That's a weird way to write $entry =~ s/\A\s+|\s+\z//g; :)

Replies are listed 'Best First'.
Re^3: How do I combine SPLIT with trimming white space
by Fletch (Bishop) on Aug 11, 2009 at 21:22 UTC

    Wouldn't argue it too hard, but that one has a bit more leaning-toothpick-itis and the two separate s///'s are a bit more explicit in what's being done. But yes, mea culpa on the slightly evil use of postfix for to get $_ set though. :)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.