in reply to Re^2: removing redundantwhitespace
in thread removing redundantwhitespace

Thanks, but I'm not actually reading from a file. I have this text in a single variable returned from a driver...

Replies are listed 'Best First'.
Re^4: removing redundantwhitespace
by ikegami (Patriarch) on Sep 13, 2008 at 13:39 UTC
    for ($text) { s/^\s+//gm; s/\s+$//gm; s/(\s)\s+/$1/g; }