Re: Simple XML to XLS format

2009-10-30 Thread Ganesh Babu N
CPAN modules are meant for Linux. It is very easy to install CPAN modules on Linux. Please refer http://www.cpan.org/modules/INSTALL.html It is not easy to install CPAN modules directly on Windows. For windows the famous distribution is ActiveState. Please read this for installation of modules ht

Re: OOB and dispatch table

2009-10-30 Thread John W. Krahn
Steve Bertrand wrote: Hi all, Hello, Within a CGI environment, I'm trying to do a dispatch table test, but can't figure out how to call the coderef as a method. Here is the working code. I'll describe what doesn't work afterwards: sub perform_find { my $self= shift; my $find_th

Re: OOB and dispatch table

2009-10-30 Thread Steve Bertrand
Shawn H Corey wrote: >>> sub perform_find { >>> >>> my $self= shift; >>> >>> my $find_this = $self->query->param( 'find_this' ); >>> my $search_data = $self->query->param( 'search_data' ); >>> >>> my %find_commands = ( >>> >>> # I'm trying to call the method on myself >>>

Re: OOB and dispatch table

2009-10-30 Thread Shawn H Corey
Steve Bertrand wrote: > Steve Bertrand wrote: >> Hi all, >> >> Within a CGI environment, I'm trying to do a dispatch table test, but >> can't figure out how to call the coderef as a method. Here is the >> working code. I'll describe what doesn't work afterwards: >> >> sub perform_find { >> >> m

Re: OOB and dispatch table

2009-10-30 Thread Steve Bertrand
Steve Bertrand wrote: > Hi all, > > Within a CGI environment, I'm trying to do a dispatch table test, but > can't figure out how to call the coderef as a method. Here is the > working code. I'll describe what doesn't work afterwards: > > sub perform_find { > > my $self= shift; > > m

OOB and dispatch table

2009-10-30 Thread Steve Bertrand
Hi all, Within a CGI environment, I'm trying to do a dispatch table test, but can't figure out how to call the coderef as a method. Here is the working code. I'll describe what doesn't work afterwards: sub perform_find { my $self= shift; my $find_this = $self->query->param( 'find_

Re: Emulating Sort through Perl

2009-10-30 Thread Parag Kalra
Hi Randal, I apologise for not crediting Perl Monks forum here. I won't repeat this henceforth :) So for all those who are not aware of what is going on. You can have a look at here - http://www.perlmonks.org/?node_id=803894 It also contains a small story about what how I first came in acquainta

Re: Emulating Sort through Perl

2009-10-30 Thread Randal L. Schwartz
> "Parag" == Parag Kalra writes: Parag> I am trying to emulate Linux 'sort' command through Perl. I got Parag> following code through Internet to sort the text file: "Through the internet"... like somehow the internet magically created your code? You could at least credit your perlmonks exc

Re: Emulating Sort through Perl

2009-10-30 Thread Jim Gibson
On 10/30/09 Fri Oct 30, 2009 1:50 PM, "Parag Kalra" scribbled: > Folks, > > Thanks a bunch for your replies... > > Honestly speaking I couldn't understand the code completely as its not mine > and being a beginer my head is spinning between these references and > complexly & strangely used so

Re: Emulating Sort through Perl

2009-10-30 Thread Parag Kalra
Folks, Thanks a bunch for your replies... Honestly speaking I couldn't understand the code completely as its not mine and being a beginer my head is spinning between these references and complexly & strangely used sort, map operators So if anyone of you can walk me through the above lines ex

Re: Emulating Sort through Perl

2009-10-30 Thread John W. Krahn
Shawn H Corey wrote: Parag Kalra wrote: # cat sort.pl my $column_number = 2; # Sorting by 3rd column since 0-origin based my $prev = ""; for ( map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { [$_, (split)[$column_number]] } map { [$_, (split)[$column_number]] . " $_" } <> ) { pri

Re: Emulating Sort through Perl

2009-10-30 Thread Parag Kalra
Thanks to all of you for sharing your codes & notes... 'sort { $a->[1] cmp $b->[1] || $a->[0] cmp $b->[0] }' - It did the trick...Thanks once again... Cheers, Parag On Sat, Oct 31, 2009 at 1:29 AM, John W. Krahn wrote: > Parag Kalra wrote: > >> Hello Folks, >> > > Hello, > > > This is my f

Re: Emulating Sort through Perl

2009-10-30 Thread Philip Potter
2009/10/30 Jim Gibson : > Approach 1. is called a "stable sort". As you can see, Perl's sort gives you > a stable sort, as the last two lines are in the order they appear in the > original file. The Unix sort is not stable, so the lines with equal keys get > reversed in the output. Whether or not y

Re: Emulating Sort through Perl

2009-10-30 Thread Jim Gibson
On 10/30/09 Fri Oct 30, 2009 12:37 PM, "Parag Kalra" scribbled: > Hello Folks, > > This is my first post here. > > I am trying to emulate Linux 'sort' command through Perl. I got following > code through Internet to sort the text file: > > # cat sort.pl > my $column_number = 2; # Sorting by

Re: Emulating Sort through Perl

2009-10-30 Thread Shawn H Corey
Parag Kalra wrote: > # cat sort.pl > my $column_number = 2; # Sorting by 3rd column since 0-origin based > my $prev = ""; > for ( > map { $_->[0] } > sort { $a->[1] cmp $b->[1] } > map { [$_, (split)[$column_number]] } map { [$_, (split)[$column_number]] . " $_" } > <> > ) { > print unl

Re: Emulating Sort through Perl

2009-10-30 Thread John W. Krahn
Parag Kalra wrote: Hello Folks, Hello, This is my first post here. I am trying to emulate Linux 'sort' command through Perl. I got following code through Internet to sort the text file: # cat sort.pl my $column_number = 2; # Sorting by 3rd column since 0-origin based my $prev = ""; for (

Emulating Sort through Perl

2009-10-30 Thread Parag Kalra
Hello Folks, This is my first post here. I am trying to emulate Linux 'sort' command through Perl. I got following code through Internet to sort the text file: # cat sort.pl my $column_number = 2; # Sorting by 3rd column since 0-origin based my $prev = ""; for ( map { $_->[0] } sort { $a->[1

Re: Problem with function getquotaroot in IMAP::Client

2009-10-30 Thread Peter Scott
On Thu, 29 Oct 2009 23:17:04 +0530, Shameem Ahamed wrote: > I am using the IMAP::Client for automating the quota check for some of > the users. My script was fairly straight, and I ran in to the below > error, while running the script. The error returned by the > $imap->error function is > > Q