RE: Split function in Perl

2005-07-25 Thread Darrell Gammill
http://search.cpan.org/~nwclark/perl-5.8.7/lib/Text/ParseWords.pm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Louie Loria Sent: Monday, July 25, 2005 9:57 PM To: perl-win32-users@listserv.ActiveState.com Subject: Split function in Perl -BEGI

RE: comparing floating point numbers

2005-07-24 Thread Darrell Gammill
'eq' is a string comparison verses '==' which is numeric. Perl appears to be applying some rounding when it converts the number to a string before printing. Make the bottom of you code look like this: if ($sum1 == $sum2) { print("EQUAL\n"); } else { print("NOT EQUAL\n

RE: help with getting file stats

2005-07-20 Thread Darrell Gammill
Have you tried stat ("$dir/$file")? If you just stat ($file), $file would have to be the full path or a file in the current directory. Do you have a sample output you could share? -Dgg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of lorid Sent: Wednesda

RE: using strict

2005-04-07 Thread Darrell Gammill
If you are just getting one array back, that is a feature of Perl. It doesn't delineate between the end of one array and the start of another in a list of arguments. The first array in the returned arguments will encompass all remaining values. If you reverse the order of the arguments, you will

RE: Can't print to screen | STDOUT messed up?

2005-03-01 Thread Darrell Gammill
Title: Message Exactly what are the commands you are using to run this script?  Is this from the DOS prompt or in the cygwin bash shell?  What is the output that you are getting if anything?   Tnx   -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of E

RE: How to use "#! perl " to directly run perl script on Win32platform?

2005-01-21 Thread Darrell Gammill
I do something similar to the 'she-bang' line with a section of Windows script statements that reads the Perl script from the remainder of the file. The section below goes ahead of the Perl statements and the script is saved as a .cmd or .bat file. -Cut Here--

RE: Random?

2004-10-11 Thread Darrell Gammill
>From "Programming Perl", 3rd Edition: 29.2.119. rand rand EXPR rand This function returns a pseudorandom floating-point number greater than or equal to 0 and less than the value of EXPR. (EXPR should be positive.) If EXPR is omitted, the function returns a floating-point number between 0 an

RE: Time::HiRes problems

2004-06-15 Thread Darrell Gammill
What do you get if you get the time as an array using gettimeofday? A difference would indicate it is a problem in the conversion of the system time format to a floating point format. The following is the relevant comment for the perldoc (see NOTE 2): time () Returns a floating seconds since th

RE: Screen Capture Desktop as Service

2004-04-27 Thread Darrell Gammill
This is not a solution so much as part of the analysis: Services are non-interactive processes as opposed to a logged in user is an interactive process. What do you expect to see on the desktop of a non-interactive session? If it is non-interactive, do you have a desktop? -Dgg -Original Me

Blocking While Reading the Network

2004-04-13 Thread Darrell Gammill
un-commented, the 'recv' command may take a second to a minute or two to respond. Sometimes adding a message increases the delay. Sometimes it is shorter. I am testing the code on Active State Perl 5.6.1 running on WinXP. Is there something I should be doing to clear the buffer, or

RE: Private Variables in OOP

2004-04-09 Thread Darrell Gammill
I would say you need to make 'hair' part of the object's attributes stored in the hash. sub hair { my ($) = @_; $s->{hair} = "brown"; } sub name { my ($s) = @_; printf "%s:%s\n", $s->{PERSON}, $s->{hair}; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: What is wrong with this?

2003-08-12 Thread Darrell Gammill
These were the data elements on the end of the input lines. You might do something a chomp before the push to strip off the EOL marker. -Original Message- From: steve silvers [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 8:53 AM To: [EMAIL PROTECTED] Subject: What is wrong wit