Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am trying to get all the unique header files in cwd and push it to an array.Can anyone advise how can I do that?
my $cwd = getcwd(); my %seen; find(sub { push @headers , $_=~ /\*\.h/ if -f $File::Find::name && !$seen{$_} +++; }, $cwd);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Putting all the files in an array
by Eliya (Vicar) on Mar 20, 2011 at 00:30 UTC | |
by Anonymous Monk on Mar 20, 2011 at 12:31 UTC | |
by Corion (Patriarch) on Mar 20, 2011 at 12:47 UTC | |
|
Re: Putting all the files in an array
by Anonymous Monk on Mar 20, 2011 at 00:00 UTC | |
|
Re: Putting all the files in an array
by wind (Priest) on Mar 20, 2011 at 00:06 UTC | |
by Anonymous Monk on Mar 20, 2011 at 00:27 UTC | |
by Anonymous Monk on Mar 20, 2011 at 00:21 UTC |