RE: Win32::OLE::Variant, perl crashing.

2006-05-05 Thread Satish Kaushik
Title: Win32::OLE::Variant, perl crashing. Hi Timothy,     Thanks for your response. This is a subroutine, where I am getting this problem while accessing Date method.   sub process_date_variant{ my $inputvar = shift;    my $sentvariant =  Variant(VT_DATE,'Jan 1, 1970 3:00 pm'); my ($conver

Re: Sort not fixing order in equivalent subsequences

2006-05-05 Thread Chris Wagner
At 11:12 AM 5/5/2006 -0400, Joe Discenza wrote: >{name => 'a', status => 0}, {name => 'b', status => 1}, {name => 'c', >status => 1}, {name => 'd', status => 0} > >and I sort { $a->{'status'} <=> $b->{'status'} } > >Should I expect the result (order of the names) to always be ('a', 'd', >'b', 'c'

RE: Win32::OLE::Variant, perl crashing.

2006-05-05 Thread Timothy Johnson
Title: Win32::OLE::Variant, perl crashing. Not sure off the top of my head.  Is there any way you could post some example code?   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Satish Kaushik Sent: Friday, May 05, 2006 12:24 PM To: perl-win32-users@listserv.ActiveS

Re: Performance of Data::Dump

2006-05-05 Thread Lyle Kopnicky
Thomas, Mark - BLS CTR wrote: Are there modules faster than Data::Dump? Interesting. I'd never heard of Data::Dump. I always use Data::Dumper. Have you tried that? It uses XS code so it should be faster. Data::Dump comes with the ActivePerl distribution. From the Data::Dump documentati

Re: Sort not fixing order in equivalent subsequences

2006-05-05 Thread D D Allen
For yucks, I wrote a simple Perl script to demostrate the different sort "pragmas" and their effect on perserving (or not) the existing order of elements in an array.   I had to add a few more elements to the test array to demonstrate the effect. Regards, ... Dewey -CODE use strict;

Re: Performance of Data::Dump

2006-05-05 Thread D D Allen
Suggest you investigate the following modules: Storable        http://search.cpan.org/~ams/Storable-2.15/Storable.pm DBM::Deep        http://search.cpan.org/~rkinyon/DBM-Deep/lib/DBM/Deep.pm I'm using DBM::Deep in a project to store thousands of hashes elements (that include hash elements) and

Re: Performance of Data::Dump

2006-05-05 Thread Lyle Kopnicky
Thanks for the suggestions, folks. I'm going to try Storable. I had originally skipped it due to lack of readability, but we can easily write separate tool to pretty-print the file, even using Data::Dump. -- Lyle Kopnicky Software Project Engineer Veicon Technology, Inc. __

RE: Performance of Data::Dump

2006-05-05 Thread Thomas, Mark - BLS CTR
> Are there modules faster than Data::Dump? Interesting. I'd never heard of Data::Dump. I always use Data::Dumper. Have you tried that? It uses XS code so it should be faster. You can also try Storable. - Mark. ___ Perl-Win32-Users mailing list Perl-

Re: Performance of Data::Dump

2006-05-05 Thread Tom Pollard
On Fri, May 05, 2006 at 11:03:51AM -0700, Lyle Kopnicky wrote: > I'm using Data::Dump in a project to periodically write a snapshot of a > hash table to disk, so it can be recovered on failure. Unfortunately, it > can take 40 seconds to write out a 10,000-entry hash table (each entry > is itself

Win32::OLE::Variant, perl crashing.

2006-05-05 Thread Satish Kaushik
Title: Win32::OLE::Variant, perl crashing. Hi Everyone,     I am using this module for the dates. While testing I came acorss one date which was not a Variant, PERL died saying can't call 'Date' method . I tried to get the 'Type' from the string but again since given string is not a Vari

Performance of Data::Dump

2006-05-05 Thread Lyle Kopnicky
Hi folks, I'm using Data::Dump in a project to periodically write a snapshot of a hash table to disk, so it can be recovered on failure. Unfortunately, it can take 40 seconds to write out a 10,000-entry hash table (each entry is itself a small hash table, one entry of which is itself a small h

RE: Sort not fixing order in equivalent subsequences

2006-05-05 Thread Joe Discenza
"Veli-Pekka Tätilä" wrote, on Friday, May 05, 2006 12:34 PM : > I can't find anything in the doc about whether Perl's sort function : > maintaining the order in equivalent subsequences. : : Hi, : You could take a look at: : : Perl\html\lib\sort.html : : To summarize V5.8 seems to be using the m

Re: Sort not fixing order in equivalent subsequences

2006-05-05 Thread D D Allen
The documentation you're looking for is available at this URL. http://search.cpan.org/~nwclark/perl-5.8.8/lib/sort.pm Read the Description section -- particularly the parts about "stablility". There are two solutions. A:  use sort 'stable'; B:  sort on both status and name as follows. sort

Guidance on how to get TCP bytes / packets sent & received

2006-05-05 Thread D D Allen
Anyone have any guidance on how to determine the numbers of network (TCP) bytes and/or packets sent / received over a TCP interface from a Perl script (AS 5.8.8 build 817)?  Is there some method to get this information from WMI (?) or some other internal / system level Windows XP interface? I've

RE: Sort not fixing order in equivalent subsequences

2006-05-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
    I don't believe you want to rely upon the order, butr add the extra sort to for the key so you know and do not leave it to the current setup and with the next release changes.   Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Joe

Re: Sort not fixing order in equivalent subsequences

2006-05-05 Thread Veli-Pekka Tätilä
Joe Discenza wrote: I can't find anything in the doc about whether Perl's sort function maintaining the order in equivalent subsequences. Hi, You could take a look at: Perl\html\lib\sort.html To summarize V5.8 seems to be using the merge sort algorithm which is stable, i.e. maintains the ori

Sort not fixing order in equivalent subsequences

2006-05-05 Thread Joe Discenza
Hello all,   I can't find anything in the doc about whether Perl's sort function maintaining the order in equivalent subsequences. Suppose I have an array of hashrefs that looks like this:   {name => 'a', status => 0}, {name => 'b', status => 1}, {name => 'c', status => 1}, {name => 'd', stat

RE: RE help

2006-05-05 Thread Hsu, David
Daniel, I was able to utilize the suggestions from the others.  I will also take a look at XML::Simple.   Thanks, David   From: Daniel McBrearty [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 4:33 PM To: Hsu, David Cc: perl-win32-users@listserv.activestate.com Subject

RE: RE help

2006-05-05 Thread Thomas, Mark - BLS CTR
David Hsu wrote: > I only want the name in last tag and the > (i.e. Susan Miers President) You may want to look into XPath. Here's a sample: use XML::XPath; my $xml = qq( John Smith, Susan Miers President ); my $x = XML::XPath->new(xml=>$xml); my $name = $x->findvalue(