> # trim right space away. I'm shure there is a shorter
> # and more elegant solution
> #
> @parts= map { do {$_=~s/\s*$//; $_ } } @parts;
Regular expressions have a tendency to be slower, than functions
that achieve aquivalent results; but, chop() cannot be considered being
used in above statement, since chops returns the trimmed character.
s/// operates by default on $_, as many other built-in functions do,
thus:
@parts = map { do { s/\s*$//; $_ } @parts;
Also, consider using the tr operator instead of s/// for speed-up
purposes.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>