in reply to Re: How to get the number of fields found by split without a warning?
in thread How to get the number of fields found by split without a warning?
Dittos to talexb, but I like scalar:
use strict; my $str = "a,b,c,d,e"; my @n = split /,/, $str; print scalar @n, "\n"
|
|---|