I have this code, and I'm getting the warning: Argument "" isn't numeric in numeric eq (==)
for $id == $_
@delete has numbers coming from a web-form(CGI request), and probably that's why perl is treating those numbers as strings. It's working fine but I don't know what to do about the warnings.
my @IDs = (21, 36, 6, 7, 64, 6435, 24);
for my $id (@IDs) {
push @insert, $id if (grep $id == $_, @delete)
}
I don't want the warnings. What is my best option?
I first thought of iterating over the array and calling int
for every element, but I didn't like the idea.