Re: [Activetcl] split doing two different things
by Jeff Hobbs other posts by this author
Apr 8 2008 10:17AM messages near this date
view in the new Beta List Site
Re: [Activetcl] split doing two different things
|
Re: [Activetcl] split doing two different things
Jeff already clarified, but we Jeffs like to be repetitive and pedantic ...
Bahr, Michael wrote:
> Now Perl has been around for over 30 years and I have been
Exaggerating is fine, but remember it's only been around 1 year longer
than Tcl (so I guess Tcl's been around 29 years ...).
> programming in Perl for over 13 years and use it as a standard for
> these things. Perl's split returns 8 strings as expected as above.
That is a grave mistake on so many levels ;).
> So can someone please explain why Tcl's split "sees" an empty string
> at the end of the line? I do not think this is normal behavior.
Indeed, as Jeff noted, how do you tell the difference between:
split a,b,c, ","
and split a,b,c ","
This is a very important distinction, one that Tcl won't trip you up
over. You can actually get Perl to do the same, it's just the default
will strip trailing empties.
Jeff
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Gene Osteen
Jeff Hobbs
Flavio Salgueiro
Michael Bahr
Jeff Hobbs
Michael Bahr
Dossy Shiobara
Michael Bahr
Dossy Shiobara
Michael Bahr
Jeff Hobbs
Enrico Herzke
Michael Bahr
Jeff Dinsmore
Michael Bahr
Gene Osteen
Jeff Dinsmore
Enrico Herzke
|