tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: language bindings (fs-independent quotas)

On Fri, Nov 18, 2011 at 01:15:47PM +0100, Manuel Bouyer wrote:
> On Fri, Nov 18, 2011 at 07:46:21AM +0200, Alan Barrett wrote:
> > Assuming that there's no need to handle fields with embedded spaces,
> > perl's split() function will DTRT.
> No, it does not because there are fields that can be empty.

This seems to work fine for me:

$ perl -e 'my @x = split(/,/, "a,b,,c"); print "1:$x[0] 2:$x[1] 3:$x[2] 
1:a 2:b 3: 4:c


Home | Main Index | Thread Index | Old Index