in reply to split,,-1 (Re: Blank File)
in thread Blank File
You learn something new every day, it seems.my ($a) = "the|sneaky|camel||"; my (@b, $nil); # Try different parameters with split and report for my $p (undef, -1) { @b = split (/\|/, $a, $p); ($nil) = pop (@b); print "split() with '$p': '$nil' should be empty, ", (length($nil)?" but isn't":"and is"),".\n"; }
|
|---|