Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Argument "" Isn't numeric in numeric eq (==)

by Bloodnok (Vicar)
on Feb 10, 2014 at 15:15 UTC ( [id://1074258]=note: print w/replies, xml ) Need Help??


in reply to Argument "" Isn't numeric in numeric eq (==)

Why not iterate over the data set, a line at a time, using a regex to capture all required occurrences...

$ perl -e 'my $t = "1,2,3,4,1,1,1,3,5,1,1,1,1"; my @s = $t =~ /(1,1),?/g; my @f = $t =~ /(1,2),?/g; die sprintf "%d success(es), %d failure(s)", scalar @s, scalar @f' returns 3 success(es), 1 failure(s) at -e line 1 ... as expected - with no warnings :-)

A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found