using Net::Telnet to test a http server

2002-11-25 Thread Admin-Stress
Hi, I wrote a script to test if a http server is OK. My method is : - telnet to por 80 - send any text If the http server is OK, it will return "some" text, and should contain string So, I assume, if I can catch , then my http server is OK. Here is my perl script: use Net::Telnet; sub e

Re: using Net::Telnet to test a http server

2002-11-25 Thread Admin-Stress
AIL PROTECTED]> wrote: > Admin-Stress wrote: > > > Hi, I wrote a script to test if a http server is OK. > > My method is : > > - telnet to por 80 > > - send any text > > > > If the http server is OK, it will return "some" text, and should cont

Problem installing Device::SerialPort 0.12 perl module on RedHat 8.0

2002-11-26 Thread Admin-Stress
Hi, I freshly installed RedHat 8.0, but I cant install your Device::SerialPort version 0.12. When I run perl Makefile.PL, I got this error : Finding ioctl methods ... trying 'termios.ph'... nope trying 'asm/termios.ph'... not useful trying 'sys/termiox.ph'... nope trying 'sys/term

module for IP calculation.

2002-11-27 Thread Admin-Stress
Hi, Is there any ready to use perl module for IP address calculation? For example: I have an IP Address and Netmask, then I need to calculate the broadcast and network. Thanks, kapot __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign

modifying xml entry

2002-12-09 Thread Admin-Stress
Hi, I have a XML file like this : password dccftp 22 127.0.0.1 1234567890 Could you give me a working perl code to modify the entries? user will input from keyboard : FTPServer Username = Password = Port Number = DCCBox IPAddress = Serial

RE: modifying xml entry

2002-12-09 Thread Admin-Stress
loads an XML file > into a hash (you probably should use forcearray => 1). You > may then modify that hash based upon user input. Finally, > print the hash to your output. > > Aloha => Beau. > > -Original Message- > From: Admin-Stress [mailto:[EMAIL PROTECTED

perl module for linux server IP address configuration

2002-12-09 Thread Admin-Stress
Hi, Just wondering is there any perl module for configuring linux server IP address? Thanks, __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

accessing com port

2003-01-02 Thread Admin-Stress
Hi, Anyone know which perl module can be used for COM Port communication? I have a device that need to be accessed via COM1 for example. It can be tested using HyperTerminal in Windows. If connected, it will give 'a prompt' then I need to type 'some commands' and the device will return somethin

tailing a text file

2003-01-07 Thread Admin-Stress
Hi, Anyone have the fastest and efficien way to tail a text file ? suppose I have a text file "example.txt" and I want to print the last X lines. Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo

Catching unknown socket (or unknown handle / filehandle)

2003-01-16 Thread Admin-Stress
Hi, In this example, to 'catch' if the socket could not be created, by using -> or die ""; #!/usr/bin/perl -w use IO::Socket; $remote = IO::Socket::INET->new( Proto=> "tcp", PeerAddr => "localhost", PeerP

checking parameters ...

2002-09-26 Thread Admin-Stress
I wrote a simple script like this : #!/usr/bin/perl if (($ARGV[0] eq "") && ($ARGV[1] eq "") && ($ARGV[2] eg "")) { print "You must give me 3 parameters\n"; exit; } Then, I tested like with 1 .. OR 2 ... OR 3 parameters, it did not print the text "You must...". Why this happened? How to

How to catch a string in parameters?

2002-09-27 Thread Admin-Stress
I want to make a script to print parameter-1, parameter-2, and parameter-3. Parameter-1 and parameter-2 just a SINGLE word. Parameter-3 = string. #!/usr/bin/perl $p1=$ARGV[0]; $p2=$ARGV[1]; $p3=$ARGV[2]; print "$p1 $p2 $p3" Then, I test it like this: ./myscript word word "this i

module for manipulating text file

2002-09-27 Thread Admin-Stress
Hi, Anyone know which module should I use to manipulate text file (like /etc/passwd for example). I meant, to read a line, search a string, deleting a line, etc. My objective is to manage /etc/passwd via perl script (later via web interface). Right now, I can create a user by calling 'useradd'

module for manipulating text file

2002-09-27 Thread Admin-Stress
Hi, Anyone know which module should I use to manipulate text file (like /etc/passwd for example). I meant, to read a line, search a string, deleting a line, etc. My objective is to manage /etc/passwd via perl script (later via web interface). Right now, I can create a user by calling 'useradd'

consume CPU process

2002-10-17 Thread Admin-Stress
Hi, Anyone can give me example of simple script that can consume cpu resources at certain level? ./consumecpu 50 Then, it will consume 50% of cpu process. I need this script to stress test my machine. Is there any way to do this on perl? I cant figure it out. Thanks, kapot

XML module

2002-10-21 Thread Admin-Stress
Hi, anyone can suggest me XML module for reading/parsing/modifying an XML file? Thanks, kapot __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit