Sooraj S wrote:
> I have an array file_list which contains absolute/relative paths of
> files. I want to remove duplicate elements and elements whose
> filenames(not the path) are same. How can i do this using grep and
> hash?

You should buy the Perl Cookbook:

    http://oreilly.com/catalog/9781565922433


This recipe should solve the first part of your problem:

    http://docstore.mik.ua/orelly/perl/cookbook/ch04_07.htm


Add in File::Basename and you should be able to do the rest.


HTH,

David

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to