Re: summarise input data using Perl

2011-07-14 Thread Leo Susanto
On Thu, Jul 14, 2011 at 2:36 AM, Shlomi Fish wrote: > Hi Leo, > > I'm commenting on your code below because it exhibits some bad elements. > > On Wed, 13 Jul 2011 11:00:33 -0700 > Leo Susanto wrote: > >> #!/usr/bin/perl >> use Text::CSV; >> use DBI; >> use Data::Dumper; > > There is no "use stric

Re: summarise input data using Perl

2011-07-14 Thread Shlomi Fish
Hi Leo, I'm commenting on your code below because it exhibits some bad elements. On Wed, 13 Jul 2011 11:00:33 -0700 Leo Susanto wrote: > Mohan, > > I would suggest you learning perl hash: http://perl101.org/hashes.html > Also see: http://perl-begin.org/topics/hashes/ > #!/usr/bin/perl > us

Re: summarise input data using Perl

2011-07-14 Thread Mohan L
> > Sorry, I messed some thing. Can you please explain the code? . You > explanation will give more idea to learn the below hash usage. > >> >> my @regions = ('east','north','south','west'); >> my @statuses_string = ('pws','open','hold','pwu','reopen'); >> my %region_data; >> foreach my $region (@

Re: summarise input data using Perl

2011-07-14 Thread Mohan L
On Wed, Jul 13, 2011 at 11:30 PM, Leo Susanto wrote: > Mohan, > > I would suggest you learning perl hash: http://perl101.org/hashes.html > Yes. I will learn the perl hash. > > #!/usr/bin/perl > use Text::CSV; > use DBI; > use Data::Dumper; > > # CONFIG VARIABLES > ... > # DATA SOURCE NAME > ..

Re: summarise input data using Perl

2011-07-13 Thread Shlomi Fish
Hi Mohan, Let me comment on your code below. On Wed, 13 Jul 2011 22:20:44 +0530 Mohan L wrote: > Dear All, > > I have the tab separated csv file with below data. > > http://pastebin.com/iDvuhjCc > > "Asset""West""pws" > "Asset""West""pws" > "Asset""Wes

Re: summarise input data using Perl

2011-07-13 Thread Leo Susanto
Mohan, I would suggest you learning perl hash: http://perl101.org/hashes.html #!/usr/bin/perl use Text::CSV; use DBI; use Data::Dumper; # CONFIG VARIABLES ... # DATA SOURCE NAME ... my @regions = ('east','north','south','west'); my @statuses_string = ('pws','open','hold','pwu','reopen'); my %re

summarise input data using Perl

2011-07-13 Thread Mohan L
Dear All, I have the tab separated csv file with below data. http://pastebin.com/iDvuhjCc "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "OnCall""West""pws"

summarise input data using Perl

2011-07-13 Thread Mohan L
Dear All, I have the tab separated csv file with below data. http://pastebin.com/iDvuhjCc "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "Asset""West""pws" "OnCall""West""pws"