A question to open a cmd window and run an exe file

2003-03-20 Thread Cai_Lixin
All, I have a question, I want to open an cmd window (DOS window), and run an exe file on that window, but this exe file need password to run, so how can I open the cmd winodw, auto type in password, auto press enter to make it run in perl? Thanks in advance! Lixin _

Re: Something like File::Sync on Win32?

2003-03-20 Thread Randy W. Sims
On 3/20/2003 6:13 PM, Sivakumaran Raman wrote: I am sending output to a printer using the following method: sysopen( PRINTER, "//TOSHIBA-Siv/My_Printer", O_WRONLY ) or die( "Failed to open PRINTER\n" ); print PRINTER @completefile ; close( PRINTER ) or die("Cannot close file\n"); I have also se

Something like File::Sync on Win32?

2003-03-20 Thread Sivakumaran Raman
I am sending output to a printer using the following method:   sysopen( PRINTER, "//TOSHIBA-Siv/My_Printer", O_WRONLY ) or die( "Failed to open PRINTER\n" ); print PRINTER @completefile ; close( PRINTER ) or die("Cannot close file\n");   I have also set $| to 1 at the top of the Perl script to

Re: Beginner Regular Expression Question

2003-03-20 Thread C. Church
> Net::Telnet, and I want to match several possible strings that would make up > the prompts. An explanation below: > > '/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "or" '/tr[0-9][0-9]/' "or" > '/ber[0-9]/' > One way is: if($string =~ /(?:b|t|be|ma)r[0-9]{2}/) { ... } The operative operator

Re: REQUIRE command

2003-03-20 Thread Steven J. McDowall
I actually implemented an even more robust version than that one (based on it) -- but it is a good example. However, I can't help but wonder if the POE modules wouldn't be a better approach now that its out there. -Steve On Thursday, March 20, 2003, at 04:46 PM, [EMAIL PROTECTED] wrote: Ch

SOLVED: Help! Trouble with Sockets and IO::Select() - Bad File Handle randomly on Win32

2003-03-20 Thread Steven J. McDowall
The problem was subtle -- but odd none the less. The error was that (and if anyone keeps a careful look out they will not be surprised for me to indicate this) I was leaking open file descriptors over time. Eventually either the program or system ran out. However, the odd thing was that connec

Re: REQUIRE command

2003-03-20 Thread shurst
Chapter 13 of O'Reilly's "Advanced Perl Programming" has a great discussion of, and example code for implementing RPC in perl. It's missing a few things (encryption was the first thing I noticed), but is an excellent starting point if you choose to follow the RPC path. Steve > Really, you wa

Beginner Regular Expression Question

2003-03-20 Thread Lupi, Guy
I am trying to figure out how to specify "or" in a regular expression. Basically, I am specifying the Prompt portion of a telnet session using Net::Telnet, and I want to match several possible strings that would make up the prompts. An explanation below: '/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "o

Re: Another regular expression question

2003-03-20 Thread Carl Jolley
On Thu, 20 Mar 2003 [EMAIL PROTECTED] wrote: > Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; > > I want to get extension of the file name which is ndu, but I always get > 04.1.20.5.002-xlite_katana_free.ndu instead of ndu. > > The sub is like: > > sub extension > { > my $path = s

Re: REQUIRE command

2003-03-20 Thread Richard Morse
On Thursday, March 20, 2003, at 04:40 PM, [EMAIL PROTECTED] wrote: The other reason is security (yes, I realise it does not make much difference), but at least I would not be handing the source of my libraries over to the purchaser of my software... Actually, you would be handing the source ov

Re: REQUIRE command

2003-03-20 Thread RWAPSoftware
In a message dated 20/03/2003 16:54:04 GMT Standard Time, [EMAIL PROTECTED] writes: Yes and no. Or maybe no and yes. Or maybe just no. As was noted on the previous, a URL won't work out of the box. You could roll your own quick-and-dirty using LWP and the 'eval' function. If the module were availa

RE: host is up ?

2003-03-20 Thread kris
Thanx a lot. I never heard about POE, it looks good, i will try it. Looks exactly what i need. :-)) kris On 18 Mar 2003 at 16:50, Peter Guzis wrote: > I suggest you look into POE (http://poe.perl.org) and more specifically > POE::Component::Client::Ping. > > Peter Guzis > Web Administrator,

RE: Hiding STDIN (keyboard) while typing

2003-03-20 Thread Thomas, Mark-BLS CTR
perldoc -q password -- Mark Thomas[EMAIL PROTECTED] Internet Systems Architect User Technology Associates, Inc. $_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;; > -Original Message- > From: Gregory, Carlton [mailto:[EMAIL PROTECTED] >

RE: Hiding STDIN (keyboard) while typing

2003-03-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Gregory, Carlton wrote: > Good Day All, > I was wondering if anyone has previously run a Perl script that > hides the STDIN from being printed to the STDOUT (console window) > while typing? > > As in when getting prompted for a password. > > Is there a Console module maybe Win32::Console? >

Hiding STDIN (keyboard) while typing

2003-03-20 Thread Gregory, Carlton
Good Day All, I was wondering if anyone has previously run a Perl script that hides the STDIN from being printed to the STDOUT (console window) while typing? As in when getting prompted for a password. Is there a Console module maybe Win32::Console? Thanks in advance for your time and kn

Re: exec(...) not working in CGI-Perl with Indigo Apache/Perl on PC/XP

2003-03-20 Thread Electron One
Thanks. I'll try it, but don't think its a problem - each script has #!Perl as the first line and Apache knows that .pl files are Perl scripts. Don't want to return, so system would not apply here. At 01:25 PM 3/20/2003 +1100, Sisyphus wrote: - Original Message - From: "Electron One" <[

API question

2003-03-20 Thread Hawley, Eric
Just got a quick question on a api program that I am trying to write to mess with Windows services. The program will run but will Give me a "Program Error" box telling me that perl has generated errors and is exiting. I put in some debug statements to assist myself but that I couldn't make sense

PERLMSI tutorial

2003-03-20 Thread Priya Rudradas
Hi All, I am trying to use the PerlMSI in the PDK to build an MSI file. Unfortunately apart from the little tutorial that Active state has, I haven't come across any other tutorial that explains the how PerlMSI can be used. Could someone out there point me to one ? Thanks Priya ___

RE: Another regular expression question

2003-03-20 Thread Scott Purcell
You could use conventional hacking. rindex will get the last '.' and substr will hand back the remainder. print extension("Base-02.04.1.20.5.002-xlite_katana_free.ndu"); sub extension { return (substr($_[0], rindex($_[0], '.'))); } -Scott -Original Message- From: [EMAIL PROT

RE: (no subject)

2003-03-20 Thread csaba . raduly
On 20/03/2003 12:12:27 JamesTillman wrote: >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Thursday, March 20, 2003 4:34 AM >> Cc: [EMAIL PROTECTED] >> Subject: RE: (no subject) >> >> >> >> >Try server\\new\$ >> > >> >> Don't. Try '\\server\new$' if

Re: Another regular expression question

2003-03-20 Thread kadir
Hi! On 20 Mar 2003 at 10:28, [EMAIL PROTECTED] wrote: > Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; > > I want to get extension of the file name which is ndu, but I always > get 04.1.20.5.002-xlite_katana_free.ndu instead of ndu. : Try the code below. i think it works. Regards,

Re: REQUIRE command

2003-03-20 Thread Thomas R Wyant_III
[EMAIL PROTECTED] wrote: > Is it possible to use the require command from a perl script on one > server, to access a library located on a different server?? > For example: > require "http://www.dokos-gr.net/RWAPSoft/cgi-bin/my_lib.pl"; Yes and no. Or maybe no and yes. Or maybe just no. As was n

Re: Another regular expression question

2003-03-20 Thread Tobias Hoellrich
At 10:28 AM 3/20/2003 -0500, you wrote: Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; I want to get extension of the file name which is ndu, but I always get 04.1.20.5.002-xlite_katana_free.ndu instead of ndu. The sub is like: sub extension { my $path = shift; my $ext

IO::Socket I/O hanging for Windows/Solaris client/server

2003-03-20 Thread Howard Siegel
[NB: This message has also been posted to comp.lang.perl.misc.] I've run out of ideas, and am hoping that someone can point me in the right direction. I have a client/server pair intended to let Windows or non-Solaris Unix users or programs interact via command line with programs on a Solaris