RE: Determining if a file is open

2010-02-18 Thread Steve Howard (PFE)
Excuse me for being in a rush and not having time to develop a sample, but I think what you want to do can be determined using WMI, in the CIM_Datafile class, there is a property named InUseCount: http://msdn.microsoft.com/en-us/library/aa387236(VS.85).aspx

RE: Advice requested, porting unix perl app to windows

2009-06-03 Thread Steve Howard (PFE)
Just piggybacking on this a little bit with one more option, if you don't mind using a windows command, there is a utility in Windows 2003 and higher, and in Windows Vista and higher, and downloadable for lower versions named 'Robocopy'. It's very good for unreliable connections or high latency

RE: New to Perl and stuck

2009-03-03 Thread Steve Howard (PFE)
Just in the simplest and most general of terms, what it sounds like you want to do is an opendir on the folder, then use readdir to get each of the file names. Store each filename in a variable, and use it in the open command to open the file. You might want to put the code that actually

RE: Commaring Two dates or month

2009-02-24 Thread Steve Howard (PFE)
Just a suggestion Why not use the Date::Calc package and use the Delta_Days function? I used to use that all the time for things like what I understand you to want to do. There are a lot of great date functions built into that package that save a lot of time in development. Steve From:

RE: Reading hash arrays in the order it was written

2008-11-19 Thread Steve Howard (PFE)
Not inherent in the hash. You could store the ordinal value as one of the values in a hash of arrays, and then sort on that when you retrieve the values, but there is really no way to guarantee the order in which it will be retrieved from the hash is the same order in which it was inserted. To

RE: WIN32::OLE help

2008-08-14 Thread Steve Howard (PFE)
I'll type this directly in so I might make a typo. You should be able to set the state in the application object: $Excel-{WindowState} = -4140; To set back to normal mode: $Excel-{WindowState} = -4143; The way to find this is to record a macro in Excel, and do what you want to see. Then view

RE: trouble accessing fully qualified $main::variable contents

2008-07-07 Thread Steve Howard (PFE)
Use our instead of my our $var = value; Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greg Aiken Sent: Monday, July 07, 2008 5:01 PM To: perl-win32-users@listserv.ActiveState.com Subject: trouble accessing fully qualified $main::variable

RE: reading the Network Interface Card(NIC) name

2007-08-27 Thread Steve Howard (PFE)
You can access WMI via Perl pretty much the same way you would any other automation object. I haven't used it to enumerate the NICs the way you want to do, but a quick and dirty example of using WMI in Perl is one I wrote to enumerate drives. You can probably use the windows scripting help to

RE: a simple program

2007-08-09 Thread Steve Howard (PFE)
I'm having a little trouble understanding the question. Are you expecting Perl to compile into an executable program like C would do? If so, Perl doesn't do that. Perl is an interpreted language, and compiles when called, then executes. The script is loaded by the interpreter, and must have the