I wrote:
You should buy the Perl Cookbook:
http://oreilly.com/catalog/9781565922433
Jeff Peng wrote:
does the cookbook have a new edition?
I remember I have read it several years ago.
2nd edition is the latest, AFAIK. Oops! Bad URL above. Here's the latest:
http://oreilly.com/ca
Original-Nachricht
> Datum: Fri, 17 Dec 2010 20:07:33 -0800
> Von: David Christensen
>
> You should buy the Perl Cookbook:
>
> http://oreilly.com/catalog/9781565922433
>
>
does the cookbook have a new edition?
I remember I have read it several years ago.
Jeff.
--
Ne
On 18/12/2010 19:21, Arun G Nair wrote:
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?
My code
===
my @file_list= q
Try:
[~]$ perl -MFile::Basename -le '@file_list = qw(aaa ddd bbb/aaa ccc
ddd kkk/ddd hhh); $,="," ; print grep { $h{$_} == 1 } grep { ++$h{$_}
} map { basename($_) } @file_list;'
ccc,hhh
[~]$ perl -le '@file_list = qw(aaa ddd bbb/aaa ccc ddd kkk/ddd hhh);
$,="," ; print grep { $h{$_} == 1 } grep
On Dec 18, 9:07 am, dpchr...@holgerdanske.com (David Christensen)
wrote:
> 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 gre
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/9781
Hi,
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?
My code
===
my @file_list= qw(aaa ddd bbb/aaa ccc ddd kkk/ddd hhh);
my %exist=();
#To