getopt long

2008-04-13 Thread Michael Ellery
I've been under the impression that Getopt::Long is included with most (if not all) distributions of perl. Recently I've encountered a few Activestate versions that don't seem to have it installed. What the current policy with this package - is it included? As of which version did it become

Re: getopt long

2008-04-13 Thread Michael Ellery
Michael Ellery wrote: I've been under the impression that Getopt::Long is included with most (if not all) distributions of perl. Recently I've encountered a few Activestate versions that don't seem to have it installed. What the current policy with this package - is it included

Re: getopt long

2008-04-13 Thread Michael Ellery
Bill Luebkert wrote: Michael Ellery wrote: Michael Ellery wrote: I've been under the impression that Getopt::Long is included with most (if not all) distributions of perl. Recently I've encountered a few Activestate versions that don't seem to have it installed. What the current policy

Re: Counting occurences?

2008-06-05 Thread Michael Ellery
Barry Brevik wrote: I can't believe this has me stymied, but here goes... I'm processing a string of chars in a loop, and the string can contain multiple lines; that is, the string has embedded \n chars in it. For display purposes, I need to count the number of \n chars in each string. Is

Re: [Fwd: Net::SSH::W32perl /Net:SSH::Perl on activeperl win32]

2008-06-16 Thread Michael Ellery
I've been trying to use Net::SFTP recently, without luck. When I try to execute a simple fetch with code like: use strict; use Net::SFTP; my $scp = new Net::SFTP( 'SOMEHOST', user = 'SOMEUSER', password = 'SOMEPASS', ) or die Unable to create host connection; my @list =

Re: [Fwd: Net::SSH::W32perl /Net:SSH::Perl on activeperl win32]

2008-06-16 Thread Michael Ellery
Jenda Krynicky wrote: Net::SSH2 works fine for me under Windows. ..and sure enough, it does! Who knew it could be so easy. Thanks. -Mike ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe:

Re: Communication between Perl and VB script

2008-06-25 Thread Michael Ellery
Jenda Krynicky wrote: It's also quite often better to wrap the functionality in a DLL using ActiveState's Perl Development Kit's PerlCtrl. VB is generaly more happy working with COM/OLE objects than with external applications. Another similar approach would be to create a scriplet that

Re: getting undefined subroutine main::sLogData after calling successfully multiple times in script.

2008-06-30 Thread Michael Ellery
Labelle, Marc S wrote: Periodically and *not* at the same point in the program each time the script will fail with an undefined subroutine main::sLogData, this after it's successfully called it 20 or 30 times before... sub sLogData(@) I notice you are using protypes here. Is

Re: UTC time conversion to local time

2008-08-14 Thread Michael Ellery
use DateTime; use DateTime::Format::HTTP; ??? -Mike Bilashi Sahu wrote: Hi, I am trying to convert UTC (In seconds) time to local Time. I will appreciate if anybody has some hints to do this. I have code like this, it does not work properly Here cds_date is in UTC seconds and $cmpn_date is

Re: Working with XML in Perl

2008-11-10 Thread Michael Ellery
Wayne Simmons wrote: Curtis Leach said: Is there a preferred module for use when working with XML in Perl? I use: XML::DOM; snip #save it back. not sure how to do this... honestly haven't done it before. that's the easy part: $maindoc-printToFile($file); -Mike

Net::XMPP

2009-01-21 Thread Michael Ellery
Anyone know if there is a ppm repo for Net::XMPP ... or perhaps another module with equivalent functionality? I've tried installing this module using the cpan shell, but I just get hanging tests which require me to kill perl. TIA, Mike Ellery ___

Re: Net::XMPP

2009-01-21 Thread Michael Ellery
sorry, I probably should have given some information about my environment. I'm running ActiveState perl 5.10.0, build 1004. I see that one of the repos for 5.8.x seems to have it. I might consider downrev-ing, but I'd prefer not to (even if it mean manually building the packages...) Michael

XML::Stream test hanging with ActivePerl 5.10.0 on winxp

2009-01-21 Thread Michael Ellery
Does anyone have experience installing XML::Stream on ActivePerl 5.10 (win32) ? I'm trying to make/install from source and I'm getting hanging tests currently... -Mike Ellery ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To

Re: help with dispatch array

2009-06-09 Thread Michael Ellery
So, something like: my %functionTable = ( 'string_1' = sub { }, 'string_2' = sub { }, ); invocation via: $functionTable{'string_1'}(ARGLIST); ..is that what you had in mind? -Mike Barry Brevik wrote: I am running Active Perl 5.8.8 on Windows. I'm coding an app right now where

Archive::Tar

2009-09-02 Thread Michael Ellery
Has anyone had success using this module with activeperl on windows XP? I've tried to run this simple script: my $tar = Archive::Tar-new(c:/myfile.tgz); $tar-extract(); ..and it just seems to consume 100% of the CPU and never complete. I also tried a plain tar file (not gzipped) and had similar

Re: Archive::Tar

2009-09-02 Thread Michael Ellery
Serguei Trouchelle wrote: Michael Ellery wrote: Has anyone had success using this module with activeperl on windows XP? I've tried to run this simple script: my $tar = Archive::Tar-new(c:/myfile.tgz); $tar-extract(); Try this: my $arc = Archive::Tar-new('c:/myfile.tgz', 1); $arc

Re: Archive::Tar

2009-09-02 Thread Michael Ellery
Serguei Trouchelle wrote: Michael Ellery wrote: my $arc = Archive::Tar-new('c:/myfile.tgz', 1); $arc-extract($arc-list_files()); It works for me just fine with most of CPAN tar.gz distributions. hmmm - I tried this and get the same results (so far I've let it run for 20 minutes max). I

Re: Help with unpack

2009-10-09 Thread Michael Ellery
Have you tried reading it as BigEndian (using the N template)? It kinda looks like BigEndian to me, but I get easily turned around by endianness... -Mike Barry Brevik wrote: I am writing an app which, at a certain point, needs to read a .PNG graphics file. The .PNG file is always small, so

Re: Help with $_

2009-10-27 Thread Michael Ellery
I would recommend either (1) don't chomp in the first place or (2) just do print $_\n. -Mike Barry Brevik wrote: I am aware that there are a number of Perl operations that will use the system variable $_ as the default variable if one is not supplied. Consider the following snippet (where

Re: Help with socket timeout

2009-12-08 Thread Michael Ellery
Barry Brevik wrote: I am using Active Perl 5.8.8 on Windows. I am writing an app that opens a TCP socket to a network printer, and then prints barcode labels on it. When the app starts up, it tries to determine if the specific printer is reachable or not. If the printer is on the

Module name with dash (or is it hypen?)

2010-02-06 Thread Michael Ellery
Does anyone know if/how module names with dashes are supported in perl? I just happened to name one of my packages with a dash in it and I wasn't able to load it (use my-package; fails with a strange error). I wonder if there is some special trick to load modules with names like this or is it

Re: Variable scoping

2010-02-19 Thread Michael Ellery
On 2/19/2010 3:29 PM, Barry Brevik wrote: I was under the impession that when I use the keyword our when declaring a variable, that the variable was then available to subroutines called from the routine that declared the variable. However, the code shown below fails with the following