Hello everybody:
I am having a problem.
On Unix platform, there is a script that need user to input data from console, then when I call Unix perl script from
Windows, these is an issue occurs, when I input data and enter "enter" so fast, the Windows console is freezed, I don't know
why, does anybody know?Thank you very much.
My code like follows: On Windows: -
$host = "192.168.18.242";
-
system("rsh " . $host . " -l brcm01 /export/home/Script/WindowsCallUnixKeyDataTest.pl");
-
On Unix: -
#!/usr/bin/perl
-
-
my $input = "";
-
-
$input = <STDIN>;
-
-
$input =~ s#\r##i; #filter character "\r"
-
-
chomp($input);
-
while($input !~ /\q/i)
-
{
-
-
print "Now you input : $input\n";
-
-
$input = <STDIN>;
-
-
$input =~ s#\r##i;
-
-
chomp($input);
-
}
-
4 3761
Any body know?
Please help me.
Thanks.
numberwhun 3,509
Recognized Expert Moderator Specialist
Any body know?
Please help me.
Thanks.
Sorry, but the way you asked your question is really not that clearly worded.
Have you tried the rsh command from your Windows command line to see if you can get in an run the perl script?
If you do that, you will see that the script is waiting for input. The system command does not seem to supply that input, so the window appears to freeze because there is no input being supplied.
Regards,
Jeff
Sorry, I means I use perl script on Windows, then remote call perl script on Unix which will ask me to input data.
I have tried it's ok of remoting call.
So, I don't know why I enter "enter" so fast, the screen console will be freezed, but when I input data, then enter "enter" slowly, there is no problem.
Could you try my script?
Thank you.
numberwhun 3,509
Recognized Expert Moderator Specialist
Sorry, I means I use perl script on Windows, then remote call perl script on Unix which will ask me to input data.
I have tried it's ok of remoting call.
So, I don't know why I enter "enter" so fast, the screen console will be freezed, but when I input data, then enter "enter" slowly, there is no problem.
Could you try my script?
Thank you.
Regardless of "where" you are executing the script from, it is still being done remotely. The script you seem to be executing is expecting input. Is the rest of your script supplying that input or is this all of it ( just a system function with an rsh command)? If this is all of it, then (as I said), the window appears to be freezing because it needs input.
Regards,
Jeff
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sam |
last post by:
I have a function writen in Perl that takes a name-value list (array) as
argument
and returns a name-value list (array).
My question is:
How to call this function from PHP and get the returned...
|
by: Patrick Useldinger |
last post by:
Hi,
I am writing a filter, i.e. a program that reads from stdin and writes
to stdout. It works ok when run on its own, but does not work when I try
to use another program's output.
- The...
|
by: lonelyplanet999 |
last post by:
Hi,
I'm a newbie to perl and is now studying about perl programming, I
read some perl programming tutorials online (enter 'Perl tutorial' at
google.com) and also find some sample perl scripts...
|
by: dpackwood |
last post by:
Hello,
I have two different scripts that do pretty much the same thing. The main
perl script is on Windows. It runs and in the middle of it, it then calls
out another perl script that then...
|
by: Jarod_24 |
last post by:
I got a project called "Forms" that hold some forms and stuff in my
solution.
A argument at startup defines wether to use a From or Console.
My plan was to create a myConsole class that would...
|
by: Peter Conrey |
last post by:
I have a perl web service (using SOAP::Lite) with a method called
"Detail" that returns a strucure (hash reference to be exact). It
works fine when consumed by a Perl client, but when I try to...
|
by: Chris Paul |
last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows.
I've set this up countless times on BSD (piece of cake) but I'm trying
to do this on Windows now so that my developer can work...
|
by: oaktown |
last post by:
Running two input forms on the same page, one php and the other (the one I would like to create) to be written in perl. The idea is to accept an input from a perl script, then pass that input to two...
|
by: happyse27 |
last post by:
Hi All,
I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters?
Two codes below :
a)...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |