Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: How to grep for a filename for each of the keys of a hash

by perl_mystery (Beadle)
on Dec 13, 2010 at 06:11 UTC ( #876798=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to grep for a filename for each of the keys of a hash
in thread How to grep for a filename for each of the keys of a hash

push @array = grep (/\Q$file_name\E/i, keys %pathname_versions);

I am getting the below error when the above piece of code is executed,what does it mean?

Type of arg 1 to push must be array (not list assignment)


Comment on Re^3: How to grep for a filename for each of the keys of a hash
Download Code
Re^4: How to grep for a filename for each of the keys of a hash
by k_manimuthu (Monk) on Dec 13, 2010 at 06:34 UTC
    my @array = grep (/\Q$file_name\E/i, keys %pathname_versions);

    That's the right thing.

Re^4: How to grep for a filename for each of the keys of a hash
by Anonymous Monk on Dec 13, 2010 at 06:35 UTC
    s/ =/,/ in that code.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2015-07-05 09:33 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 (61 votes), past polls