On Wed, Aug 08, 2001 at 11:55:42AM -0700, Sophia Corwell wrote:
> $temp =~ s/^\s+//; # Removing leading spaces
> $temp =~ s/\s+$//; # Removing trailing spaces
>
> Is there a way to combine these two statements into one?
There is, as has been mentioned by John Way. However, unless you have some
requirement that you have to do it in one regex, it's better to keep them
seperate; they're more readable that way, and possibly faster (though you'd
want to benchmark it to make sure).
Please read perldoc -q 'strip blank space'.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]