Re: Is ActivePerl 5.14 supported on PDK 7?

2012-01-16 Thread Foo JH
On 17/1/2012 3:38 PM, Foo JH wrote: > I am holding on to a PDK 7 licence. There's a need to review an old > app so I have to recompile the source. Unfortunately there seems to be > no way to download a 5.8 binary so I'm trying on the latest release > ie. 5.14. > >

Is ActivePerl 5.14 supported on PDK 7?

2012-01-16 Thread Foo JH
Hi all, I am holding on to a PDK 7 licence. There's a need to review an old app so I have to recompile the source. Unfortunately there seems to be no way to download a 5.8 binary so I'm trying on the latest release ie. 5.14. While a simple Hello World runs on 'perl hello.pl', trying to compile

Re: Odd thing with sprintf

2009-04-08 Thread Foo JH
Bill Luebkert wrote: > Try this one - the second round sub adds a .5 at one level below the > desired precision (which should only register when you're at a .5, > .05, .005, etc.: Would it be easier to simply: (int((x + 0.05) * 10))/10 ___ ActivePerl ma

Re: Thanks to all,

2008-12-11 Thread Foo JH
Actually your question was something I also remembered and forgot. Luckily someone saved me the embarassment. ;) deane.rothenma...@walgreens.com wrote: > > I've been inundated with suggestions, my cup runneth over! > > You've all been helpful. > > Deane Rothenmaier > Programmer/Analyst > Walg

Date-time module that goes beyond 2023

2008-12-04 Thread Foo JH
Hi all, The recent discussion on a date-time module leaves me wondering: Given that time() only works up to year 2023, is there a successor module which can go beyond 2023, and earlier than 1900? What will be the code implication to support this new module? _

Re: Reading hash arrays in the order it was written

2008-11-19 Thread Foo JH
Fish, David wrote: > Hello! The problem I am having is I am pulling data from a table in a > certain order and loading it into the hash array but when I read the > hash array it comes out in a different order than it is written. What I > have done as a work around, is the read the data from a fi

Re: Working with XML in Perl

2008-11-10 Thread Foo JH
Curtis Leach wrote: > I'm using a Perl 5.8.8 build on a Windows Server platform and I need to > work with XML files. If you're doing only reading (not write), XML::Simple makes XML a breeze. XML::Simple converts your xml file into a tree of native hashes and arrays. No methods to learn. __

Re: Email::MIME

2008-10-28 Thread Foo JH
> I've been programming in perl for the better part of a decade. I just > discovered this listserv a few months ago. If half the people who posted on > here spent their time answering questions instead of complaining, it would > be worth staying. In the time I was monitoring this mailing list (

Re: ActivePerl 822 and Windows GUI look/feel

2008-04-20 Thread Foo JH
I've mucked around with wxPerl for a while some time back. It's a good platform if you're keen to code in Perl. Documentation is not likely to be in wxPerl format, but it'll be quite compatible. Your biggest challenge will be that you will experience a fairly steep learning curve. After that, l

Re: Perl Prototypes

2008-03-22 Thread Foo JH
If you're trying to write a sub with default params, you can try this: sub mysub { my ($a,$b,$c) = @_; $a ||= 1; $b ||= 2; $c ||= 3; } Zarabozo, Francisco (GE, Corporate) wrote: > Hello All, > > After reading a lot on the subject, I'm guessing that it's not possible to > do what I want to do, b

Re: PDK doesn't work well with Text::Unidecode?

2008-03-17 Thread Foo JH
VERY seldom in my professional life have I seen such an incredibly responsive product team (definately NOT from Microsoft). Thumbs up. Jan Dubois wrote: > Yes, you'll need to manually add the 256 submodules right now. I'll add > a heuristic to PDK 7.2 to detect this automatically and include al

Re: Redefining Constants

2008-03-05 Thread Foo JH
All I can say is: Good luck. Have fun. :) Zarabozo, Francisco (GE, Corporate) wrote: > Thank you for your answer. > > Yes, I thought so too. Constants are by definition not-variables. I wanted > to know this for the following reasons: > > 1. All you know how a company asks you to change the les

Re: Redefining Constants

2008-03-05 Thread Foo JH
Dude. constants should not be redefined at all. Sounds like what you need is just normal variables with default settings instead. Zarabozo, Francisco (GE, Corporate) wrote: > Hello All, > > I'm having some trouble with a module where I need to implement a change. > Basically, this module defines

Where's the next 2 script games commentries?

2008-02-21 Thread Foo JH
Looking forward to them... ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Who's got the guru beard?

2008-02-21 Thread Foo JH
Ok now we know Jan is a 'deviant'. It's piqued my interest, so I looked up Randy as well At least one of us has the beard... Jan Dubois wrote: And yes, no facial hair... Back in the days (December 1999) I was the only developer at ActiveState without some kind of guru-beard (remember, I'm

Re: threads and blessed objects...

2008-02-21 Thread Foo JH
I'm not spent more time on this same issue than I should, but you need to know a few things about threading and Perl: 1. Threads::Queue takes in only scalars 2. If the scalar is a ref to an object instance, you need to share() it first 3. share()ing is not deep, so you will have to ensure you're

Re: My first 2 Scripting Games commentaries are online now

2008-02-20 Thread Foo JH
er wrote: > Ooo there's a picture up there? I'm not going to go there now because I > think it's better for his appearence to remain a mystery. :P > > At 09:37 AM 2/21/2008 +0800, Foo JH wrote: > >> Hey Jan, now I

Re: My first 2 Scripting Games commentaries are online now

2008-02-20 Thread Foo JH
One thing I like about Perl is that you don't have to use the forward-slash '\' just because you're writing for the Windows platform. Jan Dubois wrote: > Feel free to check them out, even if you are not taking part in > the Games, and let me know what you think: > > > http://www.microsoft.com/

Re: My first 2 Scripting Games commentaries are online now

2008-02-20 Thread Foo JH
Hey Jan, now I know how you look...no guru-beard? I'm disappointed. Jan Dubois wrote: > Feel free to check them out, even if you are not taking part in > the Games, and let me know what you think: > > > http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/experts.mspx > > I have

Re: 2008 Winter Scripting Games have begun

2008-02-18 Thread Foo JH
> > I took a quick look at powershell and it turned my stomach. maybe I am > an old dog unable to learn new tricks like python and such, but > powershell I really did not like, maybe given enough time... In the same way that given enough time we will all learn to enjoy the security and peace of

Re: 2008 Winter Scripting Games have begun

2008-02-17 Thread Foo JH
I guess they're trying to get some inspiration from the Perl libraries/ syntax for their next-gen scripting language? P#? PowerPerl? Jan Dubois wrote: > Microsoft is running the 3rd annual Scripting Games competition, and > this year they added a Perl division alongside VBScript and Windows > Po

Re: Next version of perl?

2007-12-13 Thread Foo JH
I think another simple answer to the question will be: 1. Perl6 is not coming out yet, and not anytime too soon 2. In the meantime, look forward to be upcoming release of Perl 5.10 Jan Dubois wrote: > On Thu, 13 Dec 2007, Paco Zarabozo A. wrote: > >> On Thu, 13 Dec 2007, Mark Pryor wrote: >>

Re: ActivePerl 5.10 Build 1000 Beta release

2007-11-25 Thread Foo JH
Wow, this is exactly what I've been waiting for this whole year! Now if the final release will only come out before Christmas...hee hee Jan Dubois wrote: > ActiveState is pleased to announce ActivePerl 5.10.0 Build 1000 Beta, > a beta release of the complete, ready-to-install Perl distribution fo

Re: Sending out Emails via Perl

2007-11-08 Thread Foo JH
I use MIME::Lite for my emails, which oftentimes need to be either in HTML or come with attachments. It's a breeze. Curtis Leach wrote: > > I have to have a way in Perl to send out emails on both Windows & Unix > systems. In searching CPAN I see 100's of them. > > Can someone recommend a simple

Re: A bit confused about DBI, DBD and ODBC

2007-11-01 Thread Foo JH
You have 2 options: 1. DBD::Oracle, which is (iirc) a native call to the database 2. DBD::ODBC which goes through the oledb layer to connect ODBC is generally to be avoided if you need performance. Alejandro Santillan Iturres wrote: > I need to access an Oracle data base and I am a bit confused a

Re: ActiveState releases ActivePerl 5.8.8.822

2007-08-05 Thread Foo JH
> > Build 822 is based on all the patches that have been already integrated > into the Perl maintenance branch that will eventually become Perl 5.8.9. > There are a huge number of patches (I think 700 or so) because the > release of 5.8.8 happened already quite some time ago. I applied another > 5

[SPAM?] Re: ActiveState releases ActivePerl 5.8.8.822

2007-08-03 Thread Foo JH
Hundreds of...I hope it's more updates than bug fixes...:P Btw, http://www.activestate.com/products/activeperl/ does not seem to render well on FireFox. It used to very well though. Jan Dubois wrote: > ActiveState is pleased to announce ActivePerl 5.8.8.822, a maintenance > release of the comple

Re: ActiveState releases ActivePerl 5.8.8.822

2007-08-02 Thread Foo JH
Hundreds of...I hope it's more updates than bug fixes...:P Btw, http://www.activestate.com/products/activeperl/ does not seem to render well on FireFox. It used to very well though. Jan Dubois wrote: > ActiveState is pleased to announce ActivePerl 5.8.8.822, a maintenance > release of the comple

Re: Parsing Config file

2007-06-12 Thread Foo JH
Your config file seems to map quite well to a nested hash table. You will probaby need 2 kinds of parsers: 1. The simple name = value pair parser, which should be easy to write with regex 2. The nest {} parser, which you probably can use a recursive function to parse deeply The other (easier) w

Re: perl_mod

2007-05-14 Thread Foo JH
Mario, (are you one of the Mario bros?) In modperl, scripts do not terminate once completed. This is for performance reasons. Even the die() function has been overloaded to avoid this. As such your global variables will remain initialised at the start of the next HTTP call. Take a look at: htt

Re: Plans for Perl 6

2007-05-12 Thread Foo JH
> Could you elaborate a bit how you envision this "focal point" to work? > I would prefer to hear some concrete examples, and not just general > hand-waving... :) > Focal point concept is similar to the Apache Foundation, where multiple technologies are being developed. People get to know abo

Re: Plans for Perl 6

2007-05-09 Thread Foo JH
> The ActiveState preferred choice of Perl GUI toolkit is Tkx (or Tcl::Tk). > I like the GUI version of PPM. Very clean. Helped me identify a new version of DBI along the way... And I agree with you that wxPerl isn't exactly easy to learn either. Bit of pain along the way. People know there'

Re: Plans for Perl 6

2007-05-09 Thread Foo JH
I agree. Such is the blessing and the curse of the community-based product. I too feel the depreciating excitement of the arrival of Perl6 as time goes by. Though I have in part switched to C# for certain implementations, Perl still has a unique productivity efficiency, though it is not easily

Re: How to write a service script?

2007-04-08 Thread Foo JH
For the free version, use Win32::Daemon from: http://www.roth.net/perl/Daemon/ If you like professional support, pay a bit and get the PDK: http://aspn.activestate.com/ASPN/docs/PDK/7.0/PerlSvc_overview.html Both are recommended. The second one will give you back your weekends. Chandra, Ramesh H

Here's wishing all in the community Gong Xi Fai Cai (happy chinese new year)

2007-02-21 Thread Foo JH
___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: use constant still misbehaving?

2007-02-01 Thread Foo JH
Not directly relating to the problem at hand, but you may want to consider using the Readonly library instead. It locks the variable from changes in the value, but has some advantages over the constant counterpart. [EMAIL PROTECTED] wrote: > > Seems there's more going wrong here. Sample code:

Re: Passing Variable from .pl to .pl

2007-01-24 Thread Foo JH
Brian Raven wrote: > In addition, the variables in your module will not be visible to the > code that "uses" it, unless you fully qualify them, e.g. > $Dell::Config::Template. Another way to make them visible is to export > them, see 'perldoc Exporter'. For example, Dell/Config.pm could look > like

Re: Passing Variable from .pl to .pl

2007-01-23 Thread Foo JH
What exactly is the error you are getting? To make your life simple, create the Dell folder in the same directory as BuildReport.pl, and Config.pm in the Dell folder. Then you won't need the 'use lib' bit. To use the Config package variable, you need to address them like this: print $Dell::Conf

Re: Passing Variable from .pl to .pl

2007-01-22 Thread Foo JH
As Brian mentioned, global variables are generally highly discouraged, as it usually leads to sloppy coding that is hard to refactor. If you want to break up your script for easy maintenance, you should consider using: 1. libraries, or in perl teminology 'packages' 2. OOP, to abstract the logic

Re: Getting Current Working Directory

2007-01-14 Thread Foo JH
Try reading up on FindBin. It works better on PerlApp-ed executables. Paco Zarabozo A. wrote: > Hello all, > > I'm trying to find a way to let a script know where it is running on > (current working directory). For the moment, i'm getting my CWD by > executing a `pwd` on linux or a `dir` =~ /r

Loading a COM object in Perl

2006-12-15 Thread Foo JH
Hi all, First I'd like to share this little gem I found on the web: Cuba, a COM object for TAPI. http://software.techrepublic.com.com/download.aspx?&compid=51135&docid=274060 Ok, now to address my problem: I'd like to load this COM object in Perl. The key line looks like this: Win32::OLE::Warn

Re: Query with array references

2006-10-12 Thread Foo JH
I will prefer to use this way instead: $rarray->[1]; The arrow indicates a reference. ukhas jean wrote: > Was playing with references and came across a feature of Perl which > puzzles me ... (I was purposefully not using the arrow -> notation to > make sure I am well versed with the other forma

Re: How to use cookie in HTTP::Request?

2006-10-08 Thread Foo JH
Try keeping the cookies: $ua = LWP::UserAgent->new(cookie_jar=>{}); Bill's solution is good because you can persist the cookies. If you don't care to persist, then the a/m code should work. 卍刕卍 wrote: > > my $address='http://bbs.abc.com/login'; > my $req = new HTTP::Request 'POST',"$address";

Re: perl exe generation!!!

2006-09-28 Thread Foo JH
There are some instances where the ActiveState packager (paid) works better. Maybe you want to consider that. ukhas jean wrote: > I was trying to create an exe from a .pl script. I was using perl2exe, > but it is giving me an error as follows:- > > D:\All kachra\c_ka_backup\CCOLON\p2x-8.10-Win

Re: Win32 Multi-threading examples

2006-09-19 Thread Foo JH
Have you read the articles on threading in Perl? Install ActivePerl and read the perlthrtut article. It's good most of the stuff you need to get started and more. Anyway you'll get better response when you ask a specific question. [EMAIL PROTECTED] wrote: > > I'm taking the dare and dipping my

Re: clarification

2006-09-19 Thread Foo JH
Definately. We ARE talking about Perl right? Regular Expressions can solve your particular problem, and it will likely solve the next few ones as well. Check it out. sandeep s kumar wrote: > > Dear Team, > I need a clarification regarding perl operators. > > ie. Is there any operator calle

A way to get current directory when using PerlSvc

2006-06-23 Thread Foo JH
Hi all, It's like this: I built an executable using PerlSvc, and I install the service like this: c:\app\test.exe --install In Services, the 'Path to Execute' field shows: c:\app\test.exe But when I start the service, and I print out the current working directory, it's: C:/WINDOWS/system32 I

Re: problem with new() method of ithreads.

2006-06-22 Thread Foo JH
Hello Ukhas, When you create a thread, your main thread continues, so effectively you have 2 threads running. The problem once your main thread creates a new thread, it reaches the end of the application code, so it terminates. When it terminates, all other threads are killed as well. That's wh

Re: XML transfer, IO::Socket, IO::Select questions

2006-04-23 Thread Foo JH
Make your life simpler: do a HTTP POST of your XML documents instead. Jack Coates wrote: Hi all, I might be barking up the wrong tree here, so please feel free to tell me there's a better way... I want to transfer some XML files from assorted clients to a server -- this is all running in a

Re: A PPM for Kinosearch?

2006-04-16 Thread Foo JH
Actually, as per the message I just forwarded to the list, these problems have been fixed in the latest developer's release, and I've placed a ppm package of it up at http://theoryx5.uwinnipeg.ca/ppms/ This requires an ActivePerl based on perl-5.8.3 or higher. Wow. I'm VERY impressed. Thanks

Re: A PPM for Kinosearch?

2006-04-16 Thread Foo JH
Apart from the failed dependency, this package itself also fails to build on Win32 when compiling several of the .c source files. Some of the errors are simple to fix (VC++ likes to have variables declared early), but there's one error involving an incorrect number of arguments to the read() fun

Re: Threads?

2006-04-16 Thread Foo JH
Daniel Rychlik wrote: I just found out that threads are indeed expensive... Even if my loop sleeps for 2 minutes thread count continues to increment... How do you destroy a thread when you know that its job is done? This is a 2K machine running the latest active perl. I am using My suspicion i

Re: A PPM for Kinosearch?

2006-04-16 Thread Foo JH
If can't find it, and you don't have the resources yourself then might try asking nicely at http://cpan.uwinnipeg.ca/cgi-bin/ppm-request. Sounds like a good idea, though I don't know how long it will be on the request queue. I note from the doco that "KinoSearch is alpha test software. The

Re: Threads?

2006-04-16 Thread Foo JH
$thread1->detach(); $thread2->detach(); # Sleep 10 seconds and check the que again for any other data. Sleep(10); You may be facing an incremental number of threads that spawn every 10 sec. Better to join the threads than to detach them, THEN do the sleep. ___