in reply to Re^2: List assignment in scalar context
in thread List assignment in scalar context

So if I want the real argument count, I have to split into a temporary array first, or else use a dummy trailing array in the assignment list. Gross.

Personally i think the issue here is that what you are trying to do is much less common than the opposite. Ie, more people would rather have split// be faster on spliting a few elements out scenarios than they would with have it be slower but more consistant with other list returning functions. After all, split may be quite the wrong way to do this. Arguably

my $count=()=$argstring=~/\s+/g; my ($arg1, $arg2, $arg3) = split /\s+/, $argstring;

is better anyway, as if the $argstring is long and you only are going to store three elements then its better not do the actual splitting (creating new svs, populating them etc) when you dont need to.

---
demerphq