FAQ

[Perl6-internals] RFC 361 (v1) Simplifying split()

Chaim Frenkel
Oct 6, 2000 at 7:46 pm
"TC" == Tom Christiansen writes:
TC> The reason that this was done this way was for the common
TC> case of someone forgetting to chop an incoming line and
TC> then splitting on whitespace.

TC> while (<>) {
TC> @F = split;
TC> ...
TC> }

Interesting. I thought it was to make it more natural.

When splitting on whitespace, one is interested in the non-space tokens.
Effectively the leading and trailing whitespace isn't there.

<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
chaimf@pobox.com +1-718-236-0183
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions