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"
Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"
  • Comment on Re: Re: How to get the number of fields found by split without a warning?
  • Download Code