Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Removal of values in array from array list

by ikegami (Pope)
on Aug 30, 2012 at 19:12 UTC ( #990825=note: print w/ replies, xml ) Need Help??


in reply to Removal of values in array from array list

my %tocheck = map { $_ => 1 } @tocheck; for (values(%checkfrom)) { @$_ = grep !$tocheck{$_}, @$_; }


Comment on Re: Removal of values in array from array list
Download Code
Re^2: Removal of values in array from array list
by jemswira (Novice) on Aug 31, 2012 at 08:15 UTC

    When I do that I get the error message:"Cant use string ("...") as an ARRAY ref while strict refs in use.

    anyway I updated the post to give more insight into the question.

      You were very vague about your input format. I assumed you meant:

      my %checkfrom = ( Meat => [qw( Fish Apple Pork Bacon )], Fruit => [qw( Apple Pie Orange Beef )], );

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-07-07 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls