Re: which packages are installed?

2005-08-16 Thread Rex Rex
Brian, I don't think you can differentiate between what came out-of-the-box and what you had installed on your own as there isn't an XML tag or attribute that I am aware of that would capture this information in PPM.xml file. That much said, this is what I think you are looking out for. # Rex Ar

Re: converting to FLOATING_POINT..

2005-08-17 Thread Rex Rex
Replace, $time = ($time * 2.0); to $time = sprintf("%0.2f", ($time * 2)); That should do it. perldoc -f sprintf -- Rex On 8/17/05, Vineet Pande <[EMAIL PROTECTED]> wrote: > Hi: > > In the following piece of script, I would like to convert the $time after * > by 2.0 to floating point, for i

Re: converting to FLOATING_POINT..

2005-08-17 Thread Rex Rex
> 1.2140.56 > 1.6168.75 > 2.0186.37 > 2.4207.82 > > rather than > 0.00.00 > 0.460.37 > 0.8106.29 > 1.2140.56 > 1.6168.75 > 2.0186.37 > 2.4207.82 > > may be sth to do with sprintf, but how to impose it on sele

Re: perl app as a service ?

2005-08-17 Thread Rex Rex
If you are in Windows OS, then you can code your program to be a Windows native service. You nee to have Win32::Daemon and take a look at this URL: http://www.roth.net/perl/Daemon/ Cheers, Rex On 8/17/05, Michael Gale <[EMAIL PROTECTED]> wrote: > Hello, > >In the past I have usually wr

Re: References Question

2005-08-19 Thread Rex Rex
In Perl, my($array, @array, %array); open(ARRAY, ">file.txt"); opendir(ARRAY, "C:/DIR"); are all different. They are not the same. Thanks, Rex On 8/19/05, Dave Adams <[EMAIL PROTECTED]> wrote: > Dan, > > It appears the $apple->[2] and $apple[2] are not the same thing. > > > #!/usr/bin/perl -

Re: round up to nearest...

2005-08-22 Thread Rex Rex
For ordinary integers, if the rounding up is truly a "rounding" and not ceiling up to the nearest highest integer, then this should work: $n = 3.2; print sprintf("%d", $n); #this will print 3 To ceil the number, wherein 3.2 --> 4 then this would work. use POSIX; print ceil($n); # this will print

Re: UNIVERSAL class like functionality for non-OO?

2005-09-06 Thread Rex Rex
For logging, why don't you try log4perl? http://log4perl.sourceforge.net/ Cheers, Rex On 9/4/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > > Hello list, > Is there a clean and elegant way to make a subroutine available to all > namespaces/packages? Something like the UNIVERSAL class for ob