We were looking at an odd call to a sub, normally it'd be:
my $res = unload($select, $from, $where);
but I found a couple of:
my $res = unload($select,, $from, $where);
Note the ",," 2 commas in the 2nd. I gather its got to do w/ the null
entries being smooshed out of existance:
sub unload
{
my ($Field,$Table,$Where) = @_;
print "($Field,$Table,$Where) = \n@_ ($#_)\n";
}
print "1: \n";
unload("one","two","three");
print "2: \n";
unload("one",,"two","three");
print "3: \n";
unload("one",,,,"two","three");
print "4: \n";
my @data = ("one", , , ,"two","three");
print "data: @data ($#data)\n";
unload(@data);
gets:
1:
(one,two,three) =
one two three (2)
2:
(one,two,three) =
one two three (2)
3:
(one,two,three) =
one two three (2)
4:
data: one two three (2)
(one,two,three) =
one two three (2)
but, er, bug? feature? likely to go away in perl 6?
a
Andy Bach, Sys. Mangler
Internet: andy_-@wiwb.uscourts.gov
VOICE: (608) 261-5738 FAX 264-5030
"[the heck w/ it] lets go bowling"
|