RE: Running Perl script without a command window

2005-04-14 Thread Jan Dubois
On Thu, 14 Apr 2005, Kevin Carothers wrote:
> On 4/14/05, Dan Baumbach <[EMAIL PROTECTED]> wrote:
> > I'm running a perl script that checks the viability of a server.  I have
> > the script scheduled to run every 5 minutes.  That means every five
> > minutes I have a command window flash on the computer as the script is
> > being run.  Is there any way to keep this command window from comming
> > up?  The script sends an email if there is server failure so I don't
> > need to see any direct output from the script.
> >
> > Thanks in advance for your answers.
> >
> > - Dan.
> >
> 
> Hi Dan!
> 
> Try this;
> 
>   use Win32::OLE;

You don't need Win32::OLE for Win32::SetChildShowWindow().

>[---]
> 
>   my($sysCmd) = "cmd.exe /c  mypgm.exe";
>   Win32::SetChildShowWindow(0);  ## make the DOS window invisible
>   system($sysCmd);

That works to suppress command windows for child processes.  To suppress
the command window of the perl program itself, just run it via wperl.exe
instead of perl.exe.

Cheers,
-Jan



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Running Perl script without a command window

2005-04-14 Thread Brian Steele [SPICEISLE.COM]
- Original Message - 
From: "Kevin Carothers" <[EMAIL PROTECTED]>
To: "Dan Baumbach" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, April 14, 2005 3:49 PM
Subject: Re: Running Perl script without a command window


On 4/14/05, Dan Baumbach <[EMAIL PROTECTED]> wrote:
I'm running a perl script that checks the viability of a server.  I have
the script scheduled to run every 5 minutes.  That means every five
minutes I have a command window flash on the computer as the script is
being run.  Is there any way to keep this command window from comming
up?  The script sends an email if there is server failure so I don't
need to see any direct output from the script.
Thanks in advance for your answers.
- Dan.
Hi Dan!
Try this;
 use Win32::OLE;
  [---]
 my($sysCmd) = "cmd.exe /c  mypgm.exe";
 Win32::SetChildShowWindow(0);  ## make the DOS window invisible
 system($sysCmd);
HTH-
kevdot
Interesting. Are you running it on the server's console, or via scheduled 
task?

I've got a number of Perl scripts running on my server via scheduled tasks, 
and they never flash any command windows on the screen.  At least, none that 
I see :-).

Brian
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Running Perl script without a command window

2005-04-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote:
> I'm running a perl script that checks the viability of a server.  I
> have the script scheduled to run every 5 minutes.  That means every
> five minutes I have a command window flash on the computer as the
> script is being run.  Is there any way to keep this command window
> from comming up?  The script sends an email if there is server
> failure so I don't need to see any direct output from the script.
How are you running this script: Scheduler or ??

Wags ;) 
> 
> Thanks in advance for your answers.
> 
> - Dan.



***
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
***


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Running Perl script without a command window

2005-04-14 Thread Kevin Carothers
On 4/14/05, Dan Baumbach <[EMAIL PROTECTED]> wrote:
> I'm running a perl script that checks the viability of a server.  I have
> the script scheduled to run every 5 minutes.  That means every five
> minutes I have a command window flash on the computer as the script is
> being run.  Is there any way to keep this command window from comming
> up?  The script sends an email if there is server failure so I don't
> need to see any direct output from the script.
> 
> Thanks in advance for your answers.
> 
> - Dan.
> 

Hi Dan!

Try this;

  use Win32::OLE;

   [---]
  
  my($sysCmd) = "cmd.exe /c  mypgm.exe";
  Win32::SetChildShowWindow(0);  ## make the DOS window invisible
  system($sysCmd);
 

HTH-
kevdot

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Running Perl script without a command window

2005-04-14 Thread Earthlink-m_ryan
Dan wrote:
I'm running a perl script that checks the viability of a server.  I have 
the script scheduled to run every 5 minutes.  That means every five 
minutes I have a command window flash on the computer as the script is 
being run.  Is there any way to keep this command window from comming up? 
The script sends an email if there is server failure so I don't need to 
see any direct output from the script.

Thanks in advance for your answers.
- Dan.
use wperl. I set .plw files to execute with wperl.exe instead of perl.exe. 
Keeps the black eye away. 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Running Perl script without a command window

2005-04-14 Thread Dan Baumbach
I'm running a perl script that checks the viability of a server.  I have 
the script scheduled to run every 5 minutes.  That means every five 
minutes I have a command window flash on the computer as the script is 
being run.  Is there any way to keep this command window from comming 
up?  The script sends an email if there is server failure so I don't 
need to see any direct output from the script.

Thanks in advance for your answers.
- Dan.
--
This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact 
the sender by reply email and destroy all copies of the original message.  To reply to our email administrator directly, 
send an email to [EMAIL PROTECTED]

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: MLDBM error

2005-04-14 Thread Peter Guzis
DB_File has a habit of breaking data file compatibility between versions.  The 
usual one-time-per-version workaround for this is to run your script with the 
old version of DB_File and dump the data structure to an intermediate format.  
Run your script a second time with the new DB_File version and import that data.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, April 14, 2005 6:36 AM
To: Perl-Win32-Users@listserv.ActiveState.com
Subject: MLDBM error


I have create/stored the file with DB_File 1.73 
and
with DB_File 1.810 or 1.809 or 1.806 I can not open !


> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im 
> Auftrag von [EMAIL PROTECTED]
> Gesendet: Donnerstag, 14. April 2005 09:58
> An: Perl-Win32-Users@listserv.ActiveState.com
> Betreff: MLDBM error
> 
> 
> sorry for wrong subject
> 
> Hi all,
> please help my:
> I have in perl 5.6.1 635 stored hash with like this
> use MLDBM qw(DB_File);
> tie (my %ZeitDB, 'MLDBM', "PC\\Share\\ZeitDB");
> 
> If I open the hash in my new perl 5.8.6 811  with the same I have:
> 
> MLDBM error: Second level tie failed, "" at ...
> 
> Have somebody a solution ? 
> 
> P.S. delete the file (with lost all data) is not the solution 
> (but work
> fine).
> 
> Best regards/Mit freundlichen Grüssen
> 
> Joachim Görner 
> 
> Informationsverarbeitung Systemtechnik Basisdienste (ISB)
> ADAC e.V., Am Westpark 8, 81373 München
> Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 
> 
> www.adac.de 
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Windows Tasks

2005-04-14 Thread Dirk Bremer
Title: Message



Stuart,
 
Thanks for all of the advice. In this particular instance, I have 
none of the concerns you raise as this is a very specialized and simple 
program/interface. I can well imagine the possible complexities present in mode 
standard Windows applications.

  
  
  From: stuart arnold 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 
  22:56To: Dirk Bremer; 
  Perl-Win32-Users@listserv.ActiveState.comSubject: RE: Windows 
  Tasks
  
  Dirk,
  Some other things 
  to watch out for when working with manipulating windows:
   
  1) Watchout for 
  languages. "File->Open" change in other languages. Don;t always depend on 
  the text.
   
  2) Check the ver# 
  of the app! using IDs to execute the command is good/safe, but, you may 
  need
  to check the s/w 
  ver# of the app.  Good example is that "Notepad" on XP and NT have 
  different IDs on some commands.
  (and we thought it 
  was an old product!)
   
  3) Watch out that 
  some apps let the user customize menus, keys, etc.  They may change what 
  you think is OK for a SendKey, and then they've changed 
it.
   
  There are a lot 
  more gotcha's when working with windows.  I've been doing this same type 
  of stuff for quite some time.
   
  HTH.
  -stuart
   
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


MLDBM error

2005-04-14 Thread joachim . goerner
I have create/stored the file with DB_File 1.73 
and
with DB_File 1.810 or 1.809 or 1.806 I can not open !


> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im 
> Auftrag von [EMAIL PROTECTED]
> Gesendet: Donnerstag, 14. April 2005 09:58
> An: Perl-Win32-Users@listserv.ActiveState.com
> Betreff: MLDBM error
> 
> 
> sorry for wrong subject
> 
> Hi all,
> please help my:
> I have in perl 5.6.1 635 stored hash with like this
> use MLDBM qw(DB_File);
> tie (my %ZeitDB, 'MLDBM', "PC\\Share\\ZeitDB");
> 
> If I open the hash in my new perl 5.8.6 811  with the same I have:
> 
> MLDBM error: Second level tie failed, "" at ...
> 
> Have somebody a solution ? 
> 
> P.S. delete the file (with lost all data) is not the solution 
> (but work
> fine).
> 
> Best regards/Mit freundlichen Grüssen
> 
> Joachim Görner 
> 
> Informationsverarbeitung Systemtechnik Basisdienste (ISB)
> ADAC e.V., Am Westpark 8, 81373 München
> Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 
> 
> www.adac.de 
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: AW: Windows Tasks

2005-04-14 Thread Alexander Apprich
Joachim,
[EMAIL PROTECTED] wrote:
Hi all,
please help my:
I have in perl 5.6.1 635 stored hash with like this
use MLDBM qw(DB_File);
tie (my %ZeitDB, 'MLDBM', "PC\\Share\\ZeitDB");
If I open the hash in my new perl 5.8.6 811  with the same I have:
MLDBM error: Second level tie failed, "" at ...
Have somebody a solution ? 
just a shot in the dark but the examples in "perldoc -f tie" do not
mix double and single quotes...
P.S. delete the file (with lost all data) is not the solution (but work
fine).
Just a best guess...
Alex
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Globbing

2005-04-14 Thread andrew Black
Roger Keane wrote:
IMO: prefer File::Find with a regex instead of globbing if you just
want to get the files from a directory tree.
I think you are right here. But there are 2 (at least) different 
circumstances
 - want to write a filter that takes one or more file  (maybe STDIN)
and produce an output.  while (<>) is ideal for this especially on 
operating systems that do the globbing for you (Unix, VMS)

 - want to do something to each file (e.g. *.html) find could be better.
Can you tell find how many directories deep to scan (e.g. if you want a 
tool that has a -r[ecursive] option.

Regexps are a bit unexpected from user standpoint.  *.html is clearer 
than .*\.html


C:\src\tst>type tst_bsdglob.pl
This is a useful little test tool.  WIll give it a go
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


MLDBM error

2005-04-14 Thread joachim . goerner
sorry for wrong subject

Hi all,
please help my:
I have in perl 5.6.1 635 stored hash with like this
use MLDBM qw(DB_File);
tie (my %ZeitDB, 'MLDBM', "PC\\Share\\ZeitDB");

If I open the hash in my new perl 5.8.6 811  with the same I have:

MLDBM error: Second level tie failed, "" at ...

Have somebody a solution ? 

P.S. delete the file (with lost all data) is not the solution (but work
fine).

Best regards/Mit freundlichen Grüssen

Joachim Görner 

Informationsverarbeitung Systemtechnik Basisdienste (ISB)
ADAC e.V., Am Westpark 8, 81373 München
Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 

www.adac.de 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


AW: Windows Tasks

2005-04-14 Thread joachim . goerner
Hi all,
please help my:
I have in perl 5.6.1 635 stored hash with like this
use MLDBM qw(DB_File);
tie (my %ZeitDB, 'MLDBM', "PC\\Share\\ZeitDB");

If I open the hash in my new perl 5.8.6 811  with the same I have:

MLDBM error: Second level tie failed, "" at ...

Have somebody a solution ? 

P.S. delete the file (with lost all data) is not the solution (but work
fine).

Best regards/Mit freundlichen Grüssen

Joachim Görner 

Informationsverarbeitung Systemtechnik Basisdienste (ISB)
ADAC e.V., Am Westpark 8, 81373 München
Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 

www.adac.de 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs