Re: remove duplicate elements from an array

2010-12-18 Thread David Christensen
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

Re: remove duplicate elements from an array

2010-12-18 Thread Jeff Peng
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

Re: Real life usage

2010-12-18 Thread Jeff Peng
Original-Nachricht > Datum: Sat, 18 Dec 2010 17:30:38 +0100 > Von: Francesco Di Lorenzo > An: "beginners@perl.org" > Betreff: Real life usage > What role do Perl have in your work? In which particular projects you use > it? Do you use it for particular piece of your softwares'

Re: XML Challenge Cannot

2010-12-18 Thread Jenda Krynicky
From: Chaitanya Yanamadala > Hai Liam > Thank you for the reply. Thank u for letting me know an alternative for > this. But there is a problem with what you have sent. > It is not just removing of the bottom group tag that is required. > > If you check the input then u can find out that the ti

Re: Real life usage

2010-12-18 Thread Chap Harrison
On Dec 18, 2010, at 10:30 AM, Francesco Di Lorenzo wrote: > This message is particularly referred to serious programmer (with serious I > mean the ones who do programming for work). > The question is this: > What role do Perl have in your work? In which particular projects you use it? > Do you

Re: Real life usage

2010-12-18 Thread Francesco Di Lorenzo
Thanks for your answer Octavian. I actually have no needs, I'm studying Perl for a general passion for programming. I only wanted to know the real life possibility of what I'm studying... Best reards, Francesco Il giorno 18/dic/2010, alle ore 20:20, "Octavian Rasnita" ha scritto: > I guess y

Re: remove duplicate elements from an array

2010-12-18 Thread Rob Dixon
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

Re: Real life usage

2010-12-18 Thread Octavian Rasnita
I guess you want to know if Perl can be used as a primary language in a job... Well, yes. I use almost only Perl for my job and I've created many programs. I have created web apps, programs that need to be ran in a command line, programs compiled as Windows executables with a Windows GUI, program

Re: remove duplicate elements from an array

2010-12-18 Thread Arun G Nair
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

Re: Real life usage

2010-12-18 Thread Uri Guttman
> "FDL" == Francesco Di Lorenzo writes: FDL> This message is particularly referred to serious programmer (with FDL> serious I mean the ones who do programming for work). The FDL> question is this: What role do Perl have in your work? In which FDL> particular projects you use it? Do y

Real life usage

2010-12-18 Thread Francesco Di Lorenzo
Hi everyone, This message is particularly referred to serious programmer (with serious I mean the ones who do programming for work). The question is this: What role do Perl have in your work? In which particular projects you use it? Do you use it for particular piece of your softwares' source cod

Re: remove duplicate elements from an array

2010-12-18 Thread Sooraj S
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