Hi, I have a file_list array containing paths to files. I want to delete duplicate elements from an array. Also i want to delete files with conflicting names ie those elements with same name but different path should also be deleted. I want this to be done with grep.
my @file_list= qw(aa dd bb/aa cc dd kk/dd hh); my %exist=(); # This removes all the duplicate elements. my @unique = grep { ! $exist { $_ }++ } @file_list; #This removes conflicting files. #Please give me your answer My output should be => "cc hh" -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/