From mail at webbee.biz Wed Apr 13 05:58:03 2011 From: mail at webbee.biz (Abhishek Jain) Date: Wed, 13 Apr 2011 18:28:03 +0530 Subject: [Bangalore-pm] link for http://mail.pm.org/mailman/listinfo/bangalore-pm Message-ID: <009c01cbf9da$70a02000$51e06000$@biz> Hi , Shantanu, pl. see we don't have a link to our mailing list anywhere on this new site http://mail.pm.org/mailman/listinfo/bangalore-pm Pl include this link on the website and also links to archives if possible, I have this request from some people now, Thanks Abhishek jain -------------- next part -------------- An HTML attachment was scrubbed... URL: From shantanu.bhadoria at gmail.com Wed Apr 13 20:12:51 2011 From: shantanu.bhadoria at gmail.com (Shantanu Bhadoria) Date: Thu, 14 Apr 2011 08:42:51 +0530 Subject: [Bangalore-pm] Bangalore-pm Digest, Vol 30, Issue 1 In-Reply-To: References: Message-ID: Done :) On Thu, Apr 14, 2011 at 12:30 AM, wrote: > Send Bangalore-pm mailing list submissions to > bangalore-pm at pm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.pm.org/mailman/listinfo/bangalore-pm > or, via email, send a message with subject or body 'help' to > bangalore-pm-request at pm.org > > You can reach the person managing the list at > bangalore-pm-owner at pm.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Bangalore-pm digest..." > > > Today's Topics: > > 1. link for http://mail.pm.org/mailman/listinfo/bangalore-pm > (Abhishek Jain) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 13 Apr 2011 18:28:03 +0530 > From: "Abhishek Jain" > To: > Subject: [Bangalore-pm] link for > http://mail.pm.org/mailman/listinfo/bangalore-pm > Message-ID: <009c01cbf9da$70a02000$51e06000$@biz> > Content-Type: text/plain; charset="us-ascii" > > Hi , > > Shantanu, pl. see we don't have a link to our mailing list anywhere on this > new site > > > > http://mail.pm.org/mailman/listinfo/bangalore-pm > > > > > > Pl include this link on the website and also links to archives if possible, > > I have this request from some people now, > > > > Thanks > > Abhishek jain > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110413/906d90c0/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > Bangalore-pm mailing list > Bangalore-pm at pm.org > http://mail.pm.org/mailman/listinfo/bangalore-pm > > End of Bangalore-pm Digest, Vol 30, Issue 1 > ******************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gurunath.katagi at gmail.com Fri Apr 15 22:33:59 2011 From: gurunath.katagi at gmail.com (Gurunath Katagi) Date: Sat, 16 Apr 2011 11:03:59 +0530 Subject: [Bangalore-pm] help in scripting Message-ID: hi .. i am new to perl .. i have a input file something pasted as below .. 16 50 16 30 16 23 17 88 17 99 18 89 18 1 .. -- and i want the output something like this : 16 50 30 23 17 88 99 18 99 1 i.e for each values in the first column, i want the elements in the second column to be a one row .. can be anybody give me psuedocode , to how to go about this .. thank you gurunath -------------- next part -------------- An HTML attachment was scrubbed... URL: From mnjagadeesh at gmail.com Fri Apr 15 22:49:23 2011 From: mnjagadeesh at gmail.com (Jagadeesh N. Malakannavar) Date: Sat, 16 Apr 2011 11:19:23 +0530 Subject: [Bangalore-pm] help in scripting In-Reply-To: References: Message-ID: Here is the sample script . hope this helps you use strict; use warnings; my $str =<{$2}}, $3; } foreach my $num (sort keys %$DATA) { print "\n$num ", join (' ', @{$DATA->{$num}}); } ---- Thanks Jagadeesh N.Malakannavar 9448471968 2011/4/16 Gurunath Katagi > hi .. i am new to perl .. > i have a input file something pasted as below .. > > 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > .. > -- > > and i want the output something like this : > 16 50 30 23 > 17 88 99 > 18 99 1 > > i.e for each values in the first column, i want the elements in the second > column to be a one row .. > > can be anybody give me psuedocode , to how to go about this .. > thank you > > gurunath > > _______________________________________________ > Bangalore-pm mailing list > Bangalore-pm at pm.org > http://mail.pm.org/mailman/listinfo/bangalore-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gurunath.katagi at gmail.com Fri Apr 15 23:43:58 2011 From: gurunath.katagi at gmail.com (Gurunath Katagi) Date: Sat, 16 Apr 2011 12:13:58 +0530 Subject: [Bangalore-pm] help in scripting In-Reply-To: References: Message-ID: hi .. how r u reading the a list of values into a scalar .. when i tried this, its taking only one value .. please find the input file attached .. and kindly reply .. Thank you gurunath On Sat, Apr 16, 2011 at 11:19 AM, Jagadeesh N. Malakannavar < mnjagadeesh at gmail.com> wrote: > Here is the sample script . hope this helps you > > use strict; > use warnings; > > my $str =< 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > EOF > > my $DATA; > > while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { > push @{$DATA->{$2}}, $3; > } > > foreach my $num (sort keys %$DATA) { > print "\n$num ", join (' ', @{$DATA->{$num}}); > } > > > ---- > Thanks > Jagadeesh N.Malakannavar > 9448471968 > > 2011/4/16 Gurunath Katagi > >> hi .. i am new to perl .. >> i have a input file something pasted as below .. >> >> 16 50 >> 16 30 >> 16 23 >> 17 88 >> 17 99 >> 18 89 >> 18 1 >> .. >> -- >> >> and i want the output something like this : >> 16 50 30 23 >> 17 88 99 >> 18 99 1 >> >> i.e for each values in the first column, i want the elements in the second >> column to be a one row .. >> >> can be anybody give me psuedocode , to how to go about this .. >> thank you >> >> gurunath >> >> _______________________________________________ >> Bangalore-pm mailing list >> Bangalore-pm at pm.org >> http://mail.pm.org/mailman/listinfo/bangalore-pm >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tr1.dat Type: application/x-ns-proxy-autoconfig Size: 493 bytes Desc: not available URL: From mnjagadeesh at gmail.com Sat Apr 16 01:04:02 2011 From: mnjagadeesh at gmail.com (Jagadeesh N. Malakannavar) Date: Sat, 16 Apr 2011 13:34:02 +0530 Subject: [Bangalore-pm] help in scripting In-Reply-To: References: Message-ID: please find attached files. if you still have difficulties getting this code running let me see your code. Thanks On Sat, Apr 16, 2011 at 12:13 PM, Gurunath Katagi wrote: > hi .. > how r u reading the a list of values into a scalar .. > when i tried this, its taking only one value .. > please find the input file attached .. > and kindly reply .. > > Thank you > gurunath > > > > On Sat, Apr 16, 2011 at 11:19 AM, Jagadeesh N. Malakannavar < > mnjagadeesh at gmail.com> wrote: > >> Here is the sample script . hope this helps you >> >> use strict; >> use warnings; >> >> my $str =<> 16 50 >> 16 30 >> 16 23 >> 17 88 >> 17 99 >> 18 89 >> 18 1 >> EOF >> >> my $DATA; >> >> while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { >> push @{$DATA->{$2}}, $3; >> } >> >> foreach my $num (sort keys %$DATA) { >> print "\n$num ", join (' ', @{$DATA->{$num}}); >> } >> >> >> ---- >> Thanks >> Jagadeesh N.Malakannavar >> 9448471968 >> >> 2011/4/16 Gurunath Katagi >> >>> hi .. i am new to perl .. >>> i have a input file something pasted as below .. >>> >>> 16 50 >>> 16 30 >>> 16 23 >>> 17 88 >>> 17 99 >>> 18 89 >>> 18 1 >>> .. >>> -- >>> >>> and i want the output something like this : >>> 16 50 30 23 >>> 17 88 99 >>> 18 99 1 >>> >>> i.e for each values in the first column, i want the elements in the >>> second column to be a one row .. >>> >>> can be anybody give me psuedocode , to how to go about this .. >>> thank you >>> >>> gurunath >>> >>> _______________________________________________ >>> Bangalore-pm mailing list >>> Bangalore-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/bangalore-pm >>> >> >> > -- Thanks, Jagadeesh N.Malakannavar 9448471968 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- 16 50 16 30 16 23 17 88 17 99 18 89 18 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: guru.pl Type: application/octet-stream Size: 323 bytes Desc: not available URL: From nvenkatesh.27 at gmail.com Sat Apr 16 23:52:24 2011 From: nvenkatesh.27 at gmail.com (Venkatesh N) Date: Sun, 17 Apr 2011 12:22:24 +0530 Subject: [Bangalore-pm] help in scripting In-Reply-To: References: Message-ID: Hi, Another solution to the problem, pgm.pl : use strict; my %h; while(<>) { chomp; @a = split(/ /); $h{$a[0]} = $h{$a[0]}." ".$a[1]; } foreach my $key(sort keys %h) { print "$key $h{$key}\n"; } Execute the above program with the data file as the command line argument. perl pgm.pl data.txt Thanks, Venkatesh N 2011/4/16 Jagadeesh N. Malakannavar > please find attached files. if you still have difficulties getting this > code running let me see your code. > > > Thanks > > > On Sat, Apr 16, 2011 at 12:13 PM, Gurunath Katagi < > gurunath.katagi at gmail.com> wrote: > >> hi .. >> how r u reading the a list of values into a scalar .. >> when i tried this, its taking only one value .. >> please find the input file attached .. >> and kindly reply .. >> >> Thank you >> gurunath >> >> >> >> On Sat, Apr 16, 2011 at 11:19 AM, Jagadeesh N. Malakannavar < >> mnjagadeesh at gmail.com> wrote: >> >>> Here is the sample script . hope this helps you >>> >>> use strict; >>> use warnings; >>> >>> my $str =<>> 16 50 >>> 16 30 >>> 16 23 >>> 17 88 >>> 17 99 >>> 18 89 >>> 18 1 >>> EOF >>> >>> my $DATA; >>> >>> while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { >>> push @{$DATA->{$2}}, $3; >>> } >>> >>> foreach my $num (sort keys %$DATA) { >>> print "\n$num ", join (' ', @{$DATA->{$num}}); >>> } >>> >>> >>> ---- >>> Thanks >>> Jagadeesh N.Malakannavar >>> 9448471968 >>> >>> 2011/4/16 Gurunath Katagi >>> >>>> hi .. i am new to perl .. >>>> i have a input file something pasted as below .. >>>> >>>> 16 50 >>>> 16 30 >>>> 16 23 >>>> 17 88 >>>> 17 99 >>>> 18 89 >>>> 18 1 >>>> .. >>>> -- >>>> >>>> and i want the output something like this : >>>> 16 50 30 23 >>>> 17 88 99 >>>> 18 99 1 >>>> >>>> i.e for each values in the first column, i want the elements in the >>>> second column to be a one row .. >>>> >>>> can be anybody give me psuedocode , to how to go about this .. >>>> thank you >>>> >>>> gurunath >>>> >>>> _______________________________________________ >>>> Bangalore-pm mailing list >>>> Bangalore-pm at pm.org >>>> http://mail.pm.org/mailman/listinfo/bangalore-pm >>>> >>> >>> >> > > > -- > > Thanks, > Jagadeesh N.Malakannavar > 9448471968 > > > _______________________________________________ > Bangalore-pm mailing list > Bangalore-pm at pm.org > http://mail.pm.org/mailman/listinfo/bangalore-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shantanu.bhadoria at gmail.com Sun Apr 17 20:48:11 2011 From: shantanu.bhadoria at gmail.com (Shantanu Bhadoria) Date: Mon, 18 Apr 2011 09:18:11 +0530 Subject: [Bangalore-pm] Bangalore-pm Digest, Vol 30, Issue 3 In-Reply-To: References: Message-ID: Gurunath, This is an ideal situation to use map. Thats the more perlish way On Sun, Apr 17, 2011 at 12:30 AM, wrote: > Send Bangalore-pm mailing list submissions to > bangalore-pm at pm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.pm.org/mailman/listinfo/bangalore-pm > or, via email, send a message with subject or body 'help' to > bangalore-pm-request at pm.org > > You can reach the person managing the list at > bangalore-pm-owner at pm.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Bangalore-pm digest..." > > > Today's Topics: > > 1. help in scripting (Gurunath Katagi) > 2. Re: help in scripting (Jagadeesh N. Malakannavar) > 3. Re: help in scripting (Gurunath Katagi) > 4. Re: help in scripting (Jagadeesh N. Malakannavar) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 16 Apr 2011 11:03:59 +0530 > From: Gurunath Katagi > To: bangalore-pm at pm.org > Subject: [Bangalore-pm] help in scripting > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > hi .. i am new to perl .. > i have a input file something pasted as below .. > > 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > .. > -- > > and i want the output something like this : > 16 50 30 23 > 17 88 99 > 18 99 1 > > i.e for each values in the first column, i want the elements in the second > column to be a one row .. > > can be anybody give me psuedocode , to how to go about this .. > thank you > > gurunath > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/83e60b7a/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Sat, 16 Apr 2011 11:19:23 +0530 > From: "Jagadeesh N. Malakannavar" > To: Gurunath Katagi > Cc: bangalore-pm at pm.org > Subject: Re: [Bangalore-pm] help in scripting > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Here is the sample script . hope this helps you > > use strict; > use warnings; > > my $str =< 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > EOF > > my $DATA; > > while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { > push @{$DATA->{$2}}, $3; > } > > foreach my $num (sort keys %$DATA) { > print "\n$num ", join (' ', @{$DATA->{$num}}); > } > > > ---- > Thanks > Jagadeesh N.Malakannavar > 9448471968 > > 2011/4/16 Gurunath Katagi > > > hi .. i am new to perl .. > > i have a input file something pasted as below .. > > > > 16 50 > > 16 30 > > 16 23 > > 17 88 > > 17 99 > > 18 89 > > 18 1 > > .. > > -- > > > > and i want the output something like this : > > 16 50 30 23 > > 17 88 99 > > 18 99 1 > > > > i.e for each values in the first column, i want the elements in the > second > > column to be a one row .. > > > > can be anybody give me psuedocode , to how to go about this .. > > thank you > > > > gurunath > > > > _______________________________________________ > > Bangalore-pm mailing list > > Bangalore-pm at pm.org > > http://mail.pm.org/mailman/listinfo/bangalore-pm > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/66563870/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Sat, 16 Apr 2011 12:13:58 +0530 > From: Gurunath Katagi > To: "Jagadeesh N. Malakannavar" > Cc: bangalore-pm at pm.org > Subject: Re: [Bangalore-pm] help in scripting > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > hi .. > how r u reading the a list of values into a scalar .. > when i tried this, its taking only one value .. > please find the input file attached .. > and kindly reply .. > > Thank you > gurunath > > > On Sat, Apr 16, 2011 at 11:19 AM, Jagadeesh N. Malakannavar < > mnjagadeesh at gmail.com> wrote: > > > Here is the sample script . hope this helps you > > > > use strict; > > use warnings; > > > > my $str =< > 16 50 > > 16 30 > > 16 23 > > 17 88 > > 17 99 > > 18 89 > > 18 1 > > EOF > > > > my $DATA; > > > > while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { > > push @{$DATA->{$2}}, $3; > > } > > > > foreach my $num (sort keys %$DATA) { > > print "\n$num ", join (' ', @{$DATA->{$num}}); > > } > > > > > > ---- > > Thanks > > Jagadeesh N.Malakannavar > > 9448471968 > > > > 2011/4/16 Gurunath Katagi > > > >> hi .. i am new to perl .. > >> i have a input file something pasted as below .. > >> > >> 16 50 > >> 16 30 > >> 16 23 > >> 17 88 > >> 17 99 > >> 18 89 > >> 18 1 > >> .. > >> -- > >> > >> and i want the output something like this : > >> 16 50 30 23 > >> 17 88 99 > >> 18 99 1 > >> > >> i.e for each values in the first column, i want the elements in the > second > >> column to be a one row .. > >> > >> can be anybody give me psuedocode , to how to go about this .. > >> thank you > >> > >> gurunath > >> > >> _______________________________________________ > >> Bangalore-pm mailing list > >> Bangalore-pm at pm.org > >> http://mail.pm.org/mailman/listinfo/bangalore-pm > >> > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/f7fe35cc/attachment-0001.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: tr1.dat > Type: application/x-ns-proxy-autoconfig > Size: 493 bytes > Desc: not available > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/f7fe35cc/attachment-0001.bin > > > > ------------------------------ > > Message: 4 > Date: Sat, 16 Apr 2011 13:34:02 +0530 > From: "Jagadeesh N. Malakannavar" > To: Gurunath Katagi > Cc: bangalore-pm at pm.org > Subject: Re: [Bangalore-pm] help in scripting > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > please find attached files. if you still have difficulties getting this > code running let me see your code. > > > Thanks > > On Sat, Apr 16, 2011 at 12:13 PM, Gurunath Katagi < > gurunath.katagi at gmail.com > > wrote: > > > hi .. > > how r u reading the a list of values into a scalar .. > > when i tried this, its taking only one value .. > > please find the input file attached .. > > and kindly reply .. > > > > Thank you > > gurunath > > > > > > > > On Sat, Apr 16, 2011 at 11:19 AM, Jagadeesh N. Malakannavar < > > mnjagadeesh at gmail.com> wrote: > > > >> Here is the sample script . hope this helps you > >> > >> use strict; > >> use warnings; > >> > >> my $str =< >> 16 50 > >> 16 30 > >> 16 23 > >> 17 88 > >> 17 99 > >> 18 89 > >> 18 1 > >> EOF > >> > >> my $DATA; > >> > >> while ($str =~ m/\G((\d+)\s+(\d+)\n)/gc) { > >> push @{$DATA->{$2}}, $3; > >> } > >> > >> foreach my $num (sort keys %$DATA) { > >> print "\n$num ", join (' ', @{$DATA->{$num}}); > >> } > >> > >> > >> ---- > >> Thanks > >> Jagadeesh N.Malakannavar > >> 9448471968 > >> > >> 2011/4/16 Gurunath Katagi > >> > >>> hi .. i am new to perl .. > >>> i have a input file something pasted as below .. > >>> > >>> 16 50 > >>> 16 30 > >>> 16 23 > >>> 17 88 > >>> 17 99 > >>> 18 89 > >>> 18 1 > >>> .. > >>> -- > >>> > >>> and i want the output something like this : > >>> 16 50 30 23 > >>> 17 88 99 > >>> 18 99 1 > >>> > >>> i.e for each values in the first column, i want the elements in the > >>> second column to be a one row .. > >>> > >>> can be anybody give me psuedocode , to how to go about this .. > >>> thank you > >>> > >>> gurunath > >>> > >>> _______________________________________________ > >>> Bangalore-pm mailing list > >>> Bangalore-pm at pm.org > >>> http://mail.pm.org/mailman/listinfo/bangalore-pm > >>> > >> > >> > > > > > -- > > Thanks, > Jagadeesh N.Malakannavar > 9448471968 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/c92f0638/attachment-0001.html > > > -------------- next part -------------- > 16 50 > 16 30 > 16 23 > 17 88 > 17 99 > 18 89 > 18 1 > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: guru.pl > Type: application/octet-stream > Size: 323 bytes > Desc: not available > URL: < > http://mail.pm.org/pipermail/bangalore-pm/attachments/20110416/c92f0638/attachment-0001.obj > > > > ------------------------------ > > _______________________________________________ > Bangalore-pm mailing list > Bangalore-pm at pm.org > http://mail.pm.org/mailman/listinfo/bangalore-pm > > End of Bangalore-pm Digest, Vol 30, Issue 3 > ******************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: