Subject: [LON-CAPA-dev] Perl Rant

From: Guy Albertelli II <[email-masked]>
Date: 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.
-- 
[email-masked]  LON-CAPA Developer  0-7-5-6-