how to stop RPC::XML::Server blocking

2006-11-13 Thread Robin Sheat
Hi, I have a small XML-RPC server I wrote using the RPC::XML::Server module, however I found that if a single task given to it takes some time, then it prevents any more requests from happening. I'd like to have each task started in its own thread (preferably with the ability to specify an upper

Re: call on script OR another

2006-11-13 Thread Jay Savage
On 11/10/06, Tony Heal <[EMAIL PROTECTED]> wrote: OK, the has to be an easy way to call one script OR another from within another, but I would like suggestions, as this does not work because there is no RegEx to put from here. #!/usr/bin/perl if ( -f '/usr/local/custom/backup.pl' || '/usr

Sort an Excel spreadsheet

2006-11-13 Thread Stephan Gross
I'm using Win32:OLE to manipulate an Excel spreadsheet.  I want to sort the sheet on the "F" column.  My code is $range1 = "A1:H" . $numrows;$sheet->Range($range1)->Sort({    Key1 => "F1",    Order1 =>

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Sebastian Stumpf
> > Please sort the IP addresses with this way could help you, > > > > @list = sort { $b <=> $a } @ip_addresses; > Wouldn't this do the same kind of sort I've been doing (aka a textual > one)? No, I don't think so. > perl -MSocket -wle 'print for map { inet_ntoa($_) } sort map > { inet_aton($_) }

Re: two questions

2006-11-13 Thread Adriano Rodrigues
On 11/13/06, Tim Wolak <[EMAIL PROTECTED]> wrote: That worked, so basicly what the \Q \E is doing is searching for non-word characters from the beginning of the line and then stops after the "E$" in my variable? Not quite right. \Q \E tell that everything in between should be interpreted as lit

RE: two questions

2006-11-13 Thread Tim Wolak
Thanks Adriano! That worked, so basicly what the \Q \E is doing is searching for non-word characters from the beginning of the line and then stops after the "E$" in my variable? Thanks again for your help!! Tim -Original Message- From: Adriano Rodrigues [mailto:[EMAIL PROTECTED] Sent

Re: two questions

2006-11-13 Thread Adriano Rodrigues
On 11/13/06, Tim Wolak <[EMAIL PROTECTED]> wrote: I have changed it to: if ($grp =~ /E\$/) { $grp = "E\$"; } This however still does not grab the "E$" from the file, I have done it several ways to try and get it to work. You have problems because of the interpolation

RE: two questions

2006-11-13 Thread Tim Wolak
I have changed it to: if ($grp =~ /E\$/) { $grp = "E\$"; } This however still does not grab the "E$" from the file, I have done it several ways to try and get it to work. Thanks, Tim -Original Message- From: Adriano Rodrigues [mailto:[EMAIL PROTECTED] Sent: M

Re: two questions

2006-11-13 Thread Adriano Rodrigues
On 11/13/06, Tim Wolak <[EMAIL PROTECTED]> wrote: My second question is when I use getopt it never detects incorrect usage if you leave out an options and complains about the variable not being there instead of informing the user they missed an option. People will tell you that's how options

Re: two questions

2006-11-13 Thread Adriano Rodrigues
On 11/13/06, Tim Wolak <[EMAIL PROTECTED]> wrote: Can anyone tell me why when matching E$ option it finds ZE instead? $ is special in regexps. Used like that /(E$)/, it means a string which where you find 'E' at the end of line. To match literal 'E$' you need to say /(E\$)/ to make the dollar l

two questions

2006-11-13 Thread Tim Wolak
Can anyone tell me why when matching E$ option it finds ZE instead? What I have is a script that looks at a file from an exchange, parses each line looking for specific products, i.e. E$, ZE, GE etc. Fro some reason when I ask the file to single out E$ it brings back all the matches for ZE, all th

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Roman Daszczyszak
Please sort the IP addresses with this way could help you, @list = sort { $b <=> $a } @ip_addresses; Wouldn't this do the same kind of sort I've been doing (aka a textual one)? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Roman Daszczyszak
my @sorted = sort { my @a = $a =~ /(\d+)/g; my @b = $b =~ /(\d+)/g; shift @a <=> shift @b or shift @a <=> shift @b or shift @a <=> shift @b or shift @a <=> shift @b } @ips; Rob Thanks, that did it! Now I have to figure out why that works... hmm.. Roman -- To unsubscribe, e-

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread John W. Krahn
Roman Daszczyszak wrote: > I have a bit of code that collects and stores all the IP addresses > used on my network. However, when I sort the list via 'sort' the IP > addresses are listed as if they were text, so the output looks like > this: > 192.168.0.1 > 192.168.0.100 > 192.168.0.101 > 192.168.

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Rob Dixon
Roman Daszczyszak wrote: I have a bit of code that collects and stores all the IP addresses used on my network. However, when I sort the list via 'sort' the IP addresses are listed as if they were text, so the output looks like this: 192.168.0.1 192.168.0.100 192.168.0.101 192.168.0.114 192.168.

Re: Perl - Bit Manipulation

2006-11-13 Thread Rob Dixon
Randal L. Schwartz wrote: > > ""Dr" == Ruud" writes: >> >> >> The "=>" operator is a synonym for the comma, but forces any word to >> its left to be interpreted as a string (as of 5.001). >> >> >> And AFAICS that isn't true: >> >> $ perl -MData::Dumper -wle' >> %n = (00 => Integer, 01 => Floa

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread kilaru rajeev
Hi Roman, Please sort the IP addresses with this way could help you, @list = sort { $b <=> $a } @ip_addresses; rgds, Rajeev -- Forwarded message -- From: Roman Daszczyszak <[EMAIL PROTECTED]> Date: Nov 13, 2006 7:08 PM Subject: Looking for a Perl module for proper IP sorting T

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Sebastian Stumpf
On Mon, 13 Nov 2006 14:38:25 +0100 "Roman Daszczyszak" <[EMAIL PROTECTED]> wrote: > Is there a Perl module that does proper IP sorting? I think you could use NetAddr::IP for that job. Or something simpler like that: use Socket; @sorted = map { inet_ntoa($_) } sort map { inet_aton($_) } @unsorted;

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Bjørge Solli
On Monday 13 November 2006 14:38, Roman Daszczyszak wrote: > I have a bit of code that collects and stores all the IP addresses > used on my network. However, when I sort the list via 'sort' the IP > addresses are listed as if they were text, so the output looks like > this: > 192.168.0.1 > 192.16

Looking for a Perl module for proper IP sorting

2006-11-13 Thread Roman Daszczyszak
I have a bit of code that collects and stores all the IP addresses used on my network. However, when I sort the list via 'sort' the IP addresses are listed as if they were text, so the output looks like this: 192.168.0.1 192.168.0.100 192.168.0.101 192.168.0.114 192.168.0.115 192.168.0.116 192.16

Re: Perl - Bit Manipulation

2006-11-13 Thread Randal L. Schwartz
> ""Dr" == "Dr Ruud" writes: "Dr> "Dr> The "=>" operator is a synonym for the comma, but forces any word to "Dr> its left to be interpreted as a string (as of 5.001). "Dr> "Dr> And AFAICS that isn't true: "Dr> $ perl -MData::Dumper -wle' "Dr> %n = (00 => Integer, 01 => Floating, 10 => C

Re: Perl - Bit Manipulation

2006-11-13 Thread Dr.Ruud
"John W. Krahn" schreef: > Dharshana Eswaran: >> %TypeofNumber = ( 00 => Integer, 01 => Floating, 10 => Char, 11 => >> Double ); > > Perl interprets numbers beginning with 0 as octal and the other > numbers as decimal so 00 is the number 0, 01 is the number 1, 10 is > the number ten and 11 is th

Re: Perl - Bit Manipulation

2006-11-13 Thread John W. Krahn
Dharshana Eswaran wrote: > Hi all, Hello, > In the below program, i give in the hash as > > %TypeofNumber = ( 0b00 => Integer, 0b01 => Floating, 0b10 => Char, 0b11 => > Double ); *You* *have* *to* *quote* *strings* my %TypeofNumber = ( 0b00 => 'Integer', 0b01 => 'Floating', 0b10 => 'Char', 0b

Re: Spam from this list

2006-11-13 Thread Bjørge Solli
On Thursday 26 October 2006 13:27, zentara wrote: > On Wed, 25 Oct 2006 06:45:57 -0500, [EMAIL PROTECTED] > > ("Ron Goral") wrote: > >Is anyone else receiving spam from this list? I use this email address > > only for this list, so it must be originating from someone on it. Any > > ideas? > > The e

Re: Perl - Bit Manipulation

2006-11-13 Thread Dharshana Eswaran
Hi all, In the below program, i give in the hash as %TypeofNumber = ( 0b00 => Integer, 0b01 => Floating, 0b10 => Char, 0b11 => Double ); Using this hash i need to priont the appropriate combination How to do that? Thanks and Regards, Dharshana On 11/13/06, Dharshana Eswaran <[EMAIL PROT

Re: Perl - Bit Manipulation

2006-11-13 Thread John W. Krahn
Dharshana Eswaran wrote: > Hi all, Hello, > I am working on the code below > > use strict; > use warnings; > > my $hex = "43"; > > my $binary = unpack 'B*', pack 'H*', $hex; > > print "$binary\n\n"; > > my @fields = unpack 'A2A2A4', $binary; > > my $i; > printf "%-4s => %s\n", $fields[$

Re: Perl - Bit Manipulation

2006-11-13 Thread Owen
On Mon, 13 Nov 2006 11:35:11 +0530 "Dharshana Eswaran" <[EMAIL PROTECTED]> wrote: > Hi all, > > I am working on the code below > > use strict; > use warnings; > > my $hex = "43"; > > my $binary = unpack 'B*', pack 'H*', $hex; > > print "$binary\n\n"; > > my @fields = unpack 'A2A2A4', $bi