[LON-CAPA-dev] Perl Rant

Guy Albertelli II lon-capa-dev@mail.lon-capa.org
Mon, 29 Sep 2003 14:41:35 -0400 (EDT)


Hi All,
I haven't done a perl rant in a while but I just found a new one

>From the description of split:

If LIMIT is ommitted or zero, trailing null fields are stripped from
the result.

---test.pl---
$a='11';
@b=split('1',$a);
print(scalar(@b)."\n");
$a='11';
@b=split('1',$a,-1);
print(scalar(@b)."\n");
--- end test.pl---

> perl test.pl
0
3


Grrrrr.
-- 
guy@albertelli.com  LON-CAPA Developer  0-7-5-6-