deadpickle has asked for the wisdom of the Perl Monks concerning the following question:
What I am doing is globbing a remote directory for files: @remote_list = $sftp->glob("$remote_dir$radar/$product/$angle/$year*.netcdf.gz");
Then I loop through a list of local files produced by a python inline command:
@file_list = files($output, $radar, $product, $angle); foreach my $file (@file_list){
The next part is really what I am asking. I want to grep the list of hash references contained in @remote_list under the key ->{filename}. I have tried if (@match = grep (/$file/, @{$remote_list}->{filename})) { with what I have thought at no success. Was wondering if anyone had an idea on how to do this. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep a list of hash references
by ikegami (Patriarch) on Mar 07, 2011 at 18:22 UTC |