In article <> ,
Tabe Kooistra <> wrote:

erldoc split reads:
:"In scalar context, returns the number of fields found and
:splits into the @_ array.
:somebody has a pointer or a hint to achieve this?
You have not indicated what it is you want to achieve.
If what you want to get out is *just* the number of fields, then
just ensure that you are in a list conext at the point the split
is evaluated, and then scalar() that context.
A couple of months ago, I saw someone here use an idiom about that.
It was something *like*
my $number_of_fields = scalar( () = split ... )
The assignment to () provided the list context.
--
Contents: 100% recycled post-consumer statements.