Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: How to get the number of fields found by split without a warning?

by Roger (Parson)
on Dec 09, 2003 at 02:37 UTC ( [id://313351]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $n =  scalar( split ',', $str );
    print "$n\n";
    
  2. or download this
    use strict;
    use Benchmark qw/timethese cmpthese/;
    ...
        my $n = scalar split ',', $str;
        #print "$n\n";
    }
    
  3. or download this
    Benchmark: timing 10000 iterations of split_anonymous, split_simple...
    
    ...
                     Rate split_anonymous    split_simple
    split_anonymous 525/s              --            -17%
    split_simple    634/s             21%              --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-19 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found