Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> Is this a bug?
Perl doesn't have a list data type but list operators. The scalar comma operator returns the last element. An empty list in scalar context is undef.° HTH
Update> The differences between split and a normal subroutine should be clarified.
a default subroutine has no prototype, (Still, there are anormal functions without simple prototype )
UpdateSorry split is one of those built-ins without reproducible prototype, hence it's more complex:
Cheers Rolf °) you seem to belive that naked parentheses impose list context and create a list value, but they are only grouping precedence ! ... see List's terminology and Parentheses in Perl for details. In reply to Re: Split does not behave like a subroutine
by LanX
|
|