unscribe

2004-01-16 Thread Walter Valenti
How i can unscribe ??? __ Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED]

exception

2002-11-26 Thread walter valenti
How is possible launch an exception in perl ??? Thanks -- God hates us all Per favore non mandatemi allegati in Word o PowerPoint. Si veda http://www.fsf.org/philosophy/no-word-attachments.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

timing

2002-10-22 Thread walter valenti
Hi, if i exec sleep $tm, the process sleeps for a time beetwen $tm-1 and $tm seconds. If i want do sleep the process for a time $tm +/- $delta with $delta << $tm ? Is possible ??? Thanks Walter -- God hates us all Per favore non mandatemi allegati in Word o PowerPoint. Si veda http

Term modules

2002-07-17 Thread walter valenti
Hola, someone has used the module Term::ReadPassword with the module use Term::ANSIScreen ??? When i call the "cls" (clear screen) function of ANSI module before of "read_password" of ReadPassword module, the "cls" function don't work. Ex. sub read{ cls; $pass=read_password; } ##don'

fork

2002-05-03 Thread walter valenti
Hi, if i've got a script like: for($i=1;$i<=5;$i++){ my $pid=fork; die "$!\n" unless defined($pid); unless($pid){ sleep; } } sleep; The father forks 5 childs that sleeping, and after also the father sleeps. The question is: if i send a 'TERM' at the father, i want that the f

case

2002-04-22 Thread walter valenti
Hi, there is in Perl a statement "case" like in "C" or in "Pascal" ??? Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Multithread

2002-04-19 Thread walter valenti
Hi, someone has experience with multithread programmation in Perl?? Thanks Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

swich user

2002-04-16 Thread walter valenti
Hi, i've got a demon i perl that start from root. I would like that after the starting (when starts, does some operation like root), it swiches like other user with low privileges (es. like Apache, starts from root and swiches at www-data). I'm trying the POSIX module, using the function: POSI

Re: simulating c structures in perl

2002-04-10 Thread walter valenti
Roy Peters wrote: >How would you define c type structures in perl? > >eg. > >struct { >int a; >int b; >int c >} STRUCT1; > >int STRUCT1 s; > >s.a =1; >s.b =2; >s.c =3; > >How would I write this in perl? > >Thanks. > $s{'a'}=1; $s{'b'}=2; $s{'c'}=3; Walter -- To unsubscribe, e-mail: [EMA

signal KILL

2002-03-27 Thread walter valenti
Hi, i've got a process that end with a "die". I want capture this kill with another process. How i can do??? Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

STDOUT

2002-03-06 Thread walter valenti
Hi, i've got a binary executable file, that give a result on STDOUT (shell). I'm reditected STDOUT on a file as: use Getopt::Long; open(STDOUT,">/usr/local/netsaint/var/tmp") || die"$!\n"; &GetOptions("p=i" => \$port); $|=1; system("/usr/local/netsaint/libexec/check_http 127.0.0.1 -p $port"); c

Re: Sockets

2002-02-27 Thread walter valenti
There two via: 1) C language style, 2)using a module. 1) ##example client use Socket; ##export costants socket(SK,PF_INET,SOCK_STREAM,getprotobyname('tcp')) || die"$!\n"; ###declaration: SK is a name gived at the socket; PF_INET is a costant: socket internet; SOCK_STREAM is a costant: ## type o

Re: How to declare signed char in Perl?

2002-02-26 Thread walter valenti
Where you print $exit_value ??? >Hi, >I have a problem with a program I did in Perl : >I use the function system(@args) to launch an external command, >and then get the exit value : $exit_value = $? >> 8. >That runs fine, the problem is the exit value can be -1, so $exit_value >should be a signed

Re: convert array to integer

2002-02-22 Thread walter valenti
kitti wrote: >how to convert array to integer > >$array[0]=5 >$array[1]=6 >$array[2]=7 >$array[3]=8 > >change to integer 5678 for calculate 5678+2=5680 > >thanks, > In not much elegant... foreach(@array){ $num.=$_; } $num=$num-0; Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: convert ctime to a string

2002-02-15 Thread walter valenti
n,hour, methods are obvious. day method is number of the day (1 to 31) month imethos s the number month's from 0 (January) to 11 (December) year method is the year menus 1900 Walter > > >Big thanx. >Dp. > > >On 15 Feb 2002 at 17:20, walter valenti wrote: > >&

Re: convert ctime to a string

2002-02-15 Thread walter valenti
use Time::localtime; sub tempo{ my $tm=localtime(); my $h=$tm->hour; my $m=$tm->min; my $s=$tm->sec; my $md=$tm->mday; ##giorno my $me=$tm->mon+1; ##mese my $y=$tm->year+1900; return "$h:$m:$s [$md/$me/$y] "; } Walter >Hi Gurus, > > SYS stuff: perl 5

Re: @INC

2002-02-15 Thread walter valenti
You can find in the directory of @INC For example a module XX::pippo you must find @INC/XX/pippo.pm Walter >Am trying to find out what modules have been installed on my system. I know they're >stored in the @INC array, but how do I find out which ones they are? > >thanks for any help, >

Re: pidof a process

2002-02-07 Thread walter valenti
Jorge Goncalvez wrote: $pid=$$; ### the special variable $$ contains the owner process Walter >Hi, Iw onder if there is a way to obtain the PID of a process with perl? >Thanks. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CMD command

2002-02-07 Thread walter valenti
man Net::Telnet Walter >Hi anyone how to use the cmd command >in the NET::TELNET module. > >I knows it issues command and retrieve output. >I try using it in my program but there is no output. >Is there anything I should prepare for in the server >side before using the cmd command. > >Can an

Re: Difference between == and eq

2002-02-06 Thread walter valenti
eq: to use for the strings = : to use in numeric contest.(if you = in string contest in every true). If you don't know if are string or numerical use eq Walter > Hello, > > I have a small question: what's the difference between == and eq? > > When I do: > > if ( $menuitem == "modify_r

Re: socket help, last time i promise ;)

2002-02-06 Thread walter valenti
Scott L Ryan wrote: >I want to display a message when a client connects to the server. > >msg> > >right now, I cannot seem to display that message until I have received >something from the client and I want to display it before the client >sends anything. puzzling.. > >#!/usr/local/bin/perl >

Re: sockets help??

2002-02-06 Thread walter valenti
> > >I am trying to write winsock software to have one client connect to three different >server computers (not simultaneously) by simple sock stream. I tried to create one >socket and connect to each computer. Once the previous connection is completed with >one of the computers, I would chan

Re: open socket

2002-02-05 Thread walter valenti
I don't understand your question. Do you don't want use IO::Socket but the low level socket function Walter >why i open socket with Socket(); to host "localhost", protocol "tcp" & >port "110" {for POP3} > >i can it make only with >IO::Socket::INET->new(PeerAddr=>$host, PeerPort=>$po

Re: sockets

2002-02-05 Thread walter valenti
What's the scottscript script??? It is called by a system, function and executing in a self space. If this script print on STDOUT, for this script scottscript,STDOUT is the screen, don't the file (is the file for the script viewed in this mail). P.S. Sorry for my bad english . Walter >C

Re: socket

2002-01-30 Thread walter valenti
Sorry, for the Italian, but for an error i send here mail mail insted of perl-it ! I'm tryied to use send(SO,"GET / HTTP/1.0\r\n\r\n",0) and it work. Thanks Walter Bob Showalter wrote: >>-Original Message- >>From: walter valenti [mailt

socket

2002-01-30 Thread walter valenti
Hola, qualcuno sa dirmi perchè: #!/usr/bin/perl use IO::Socket; #use diagnostics; my $host=$ARGV[0]; if(!$host){ die"...host???\n"; } $|=1; $socket=IO::Socket::INET->new(PeerAddr =>$host, PeerPort=>80, Proto=>"TCP") || die"$!\n"; print $socket "GET / HTTP/1.0\r\n\r\n"; while(<$socket>){

Re: If statement

2002-01-10 Thread walter valenti
Ther'isn syntax error. How failing ?? > I want the following statement to do something if either of this conditions > exist. "or" Statement > > if ((substr($_, 42, 7) eq "Running") || (substr($Nextline, 42, 7) eq > "Running")) > > It is reading the right substrings but failing. > What am I doin

Re: 'my' for each loop or no ?

2002-01-08 Thread walter valenti
Hi, could be more efficient the first code, because you allocate, the memory space one single time. In the second code you allocate the memory space every time. Walter > Hi, > > Was wondering which of these 2 pieces of code is more efficient : > > > my $file ; > foreach $file (@ta

Re: A tk question

2002-01-08 Thread walter valenti
I think thath is a problem of implementation of TK on Win/DOS. On Linux with Gnome Desktop i'm tries something script with TK, opening new window by a button, without problem. if you post all the code is best... Walter > I have a TK issue. > > This code creates the initial TK box. > > >>

file

2002-01-08 Thread walter valenti
Hi, how is possible know if a file is open in read/write by another process ??? Thanks Walter _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

STDIN

2001-12-20 Thread walter valenti
Hi, someone knows, how insert text gron STDIN, without see this on the shell?? For example for insert a password.. Thanks Walter †(¹†¡¢ž·*.­úÞ{&¡¢‡(™§]­ë,jØm¶Ÿÿ™¨¥É¨h¡Ê&

HTML::Parser

2001-12-12 Thread walter valenti
Hi, i'm looking for some SIMPLE examples of HTML::Parser module. I'm find some examples but are complex. Thanks Walter _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail:

Re: Line in file

2001-12-11 Thread walter valenti
"Kipp, James" wrote: > there is a special var $. that hold the current record number Or can use a counter. Walter > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, December 11, 2001 9:30 AM > > To: [EMAIL PROTECTED] > > Subject: Li

beginners@perl.org

2001-11-16 Thread walter valenti
Hi, i'm using a CPAN module (pop3client), my problem is the . In this module a can active the debug and it goes on , thet is for defalt displayed on terminal. Is possible to redirect the on a variable, and not displayed on the terminal. whene a message goes at i don't want see on monitor

Re: Off-Topic (200%) - Where are you from?

2001-11-09 Thread walter valenti
Italia (Italy) > By reading the messages everyday I can guess most of us are from United > States right? And since there are not a lot of messages in (my) morning > time, probably means most are from the west coast (different timezone). > > Am I right? > > I'm from Quebec, Canada.. and yo

Re: Question

2001-11-09 Thread walter valenti
You can't execute iptables -L from a normal user => the script perl must be the root permission. Walter > Hello All! > > This may be more of a linux quest but I would like to try and run iptables > -L on Redhat through a perl script. Unfortunately it errors out because it > requries root acc

Re: Help with net::telnet

2001-11-09 Thread walter valenti
What's your problem ??? Walter > Hi, > I am trying to get Perl telnet to work on our *nix > boxes, and I am missing something. I'm sure it is > obvious. If anyone can help. I would appreciate it. > Listed below is the code I use and the login screen > from one of our FreeBSD boxes (sp

Re: Reading from a remote site.

2001-10-31 Thread walter valenti
There is a package LPW. Shold be in the standard distribution of perl, anyhow you can dowload from CPAN Ex1. use LWP::Simple; $data = get("http://$host/";); print "$data\n"; Ex2. use LWP::UserAgent; $cnt="http://$host/";; $agente=new LWP::UserAgent; $rqs=new HTTP::Request('GET',$cnt); $da

Re: Order of operations!

2001-10-31 Thread walter valenti
Could be a problem of path of a.out (Why you use kill -9 ? You can use a normal TERM signal, with kill $pid) Walter > Below is some perl code which works fine when executed locally, however when > I telnet to the system it is on and and it is run things are not run in the > correct orde

Re: create an empty file

2001-10-31 Thread walter valenti
open(FL,">c:\cygwin_syslog.txt"); Walter > Hi, How do u create an empty file named c:\cygwin_syslog.txt in Perl? > Thanks > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _ Do

Re: beginners join function question

2001-10-30 Thread walter valenti
#!/usr/bin/perl #use strict; open (NAMES, "names.txt")||die "can't open names.txt $!"; while($lin=){ push (@list,$lin); } $result=join(" ",@list); Bye Walter > hi, > i've read and reread "learning perl"'s explanation of the join > function but i still can't get join to do

Re: Text file line input referencing

2001-10-24 Thread walter valenti
I think thath be very simply use a counter. Walter > Hi all, > > I am wondering if there is any way that I can take the contents of a > specific text file line number (I suppose it could be called a paragraph, > since a line is considered ended by a CR/LF and may contain multiple > sentences

Re: Sending HTTP Headers

2001-10-24 Thread walter valenti
Why you use Socket? You can LWP. > I was just wondering how one would go about sending an HTTP request header > to a webserver. > Right now, I have a perl script gather various system information (uptime, > users, load average, etc.) and jumble it into a big, ready to post block. > All I need to

Re: Can you setuid root from Perl?

2001-10-22 Thread walter valenti
No, there is'nt a module for setuid root. You can, for example, do a call at: system ("su -"), but it require a password. This is ogic for have a security (have a script thath switch at root can be dangerous). Walter > Anyone know if you can setuid root from a perl program or module? > > Jo

Re: "BETWEEN" Comparison Operator

2001-10-18 Thread walter valenti
If (($x>-10) && ($x<10)){ ##cod to execute } Bye > Hi, > very simple question here I think. Trying to get an IF to test whether a > numeric variable is in a certain range & if it is then execute an action : > > if ($variable <-10) { > > $sth1->execute($variable) o

Re:Data structure for handling Binary Data

2001-10-18 Thread walter valenti
Hi, you can use two package: Socket, and Net::RawIP (needs libpcap); With Net::RawIP you can built packet (ip,udp,tcp) how you want and to analize the packet. Ex. use Net::RawIP qw(:pcap); use Socket; $a=new Net::RawIP; $|=1; $filtro='ip proto \\tcp and (dst host '.$host.' or src host '.$host.'

Re: fork function

2001-10-05 Thread walter valenti
that make the request with LWP or SOCKET } dont' make symoultaneus connections but every only one connection for cicle. Thanks Walter > On Wed, Oct 03, 2001 at 11:19:09AM +0200, walter valenti wrote: > > i've some difficulty on the use of fork function. >

sniffer

2001-10-04 Thread walter valenti
I'm tried, to make a little sniffer with Net::RawIP. I'v got a problem: the bset function, make a "out of memory" after some cicle. #!/usr/bin/perl $|=1; use Net::RawIP qw(:pcap); $a=new Net::RawIP; $b=new Net::RawIP; $filtro='ip proto \\tcp'; $size=1500; $tout=60; $pcap=$a->pcapinit('eth0',$f

fork function

2001-10-03 Thread walter valenti
Hi, i've some difficulty on the use of fork function. I know that the fork function make a process child, but the i don't know how write the code. Thanks Walter _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.

Hash

2001-09-26 Thread walter valenti
Hi, There's a method for delete a element in a hash ??? (for example in a hash contains 10 elements after deleting a element, it shall contains 9 elements). Thanks Walter èb‹˜j(ër¢êß­ç²j(r‰šuÚ޲ƭ†ÛiÿùšŠ\š†Š¢

Re: Net::FTP module

2001-09-26 Thread walter valenti
If you use Debian Linux there's tha packege .deb, and you can install with dselect. Otherwise look for in CPAN. Walter Sofia wrote: > >From where can I download the Net::FTP module? > > Thanks in advance > > __ > Do You Yahoo!? >

Re: Socket Connections & TCP options associcated with them.

2001-09-24 Thread walter valenti
There's a packege Net::RawIP, to built packets TCP, UDP, ICMP, and capture packets (is a wrapper for libpcap). Work only on *nix system. Walter > Any ideas on how to set the TCP options on socket connections? setsockopts > seems only to deal with the socket layer. > > -mike > > -- > To

Re: Inserting into the middle of arrays

2001-09-24 Thread walter valenti
$array[$x]=$scalar; > How do I insert $scalar into position $x of @array, where $x is smaller than > $#array? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get

reg expr

2001-09-21 Thread walter valenti
How i can write a reg. expr for find the IP address in log file like: 15:46:25.967683 194.244.46.38.1412 > 207.88.221.53.119: . ack 1115 win 8760 (DF) 15:46:26.600505 194.244.46.38.1412 > 207.88.221.53.119: P 15:21(6) ack 1115 win 8760 (DF) 15:46:26.600972 194.244.46.38.1412 > 207.88.221.53.119:

Tk

2001-09-21 Thread walter valenti
I've a question on Tk module. I'v a first window, with a botton, thath has a event to open a second window. The problem: how i can ONLY the second window with a event at a botton at this 2nd window?? Thanks Walter _ Do You Ya

Re: get & cache

2001-09-21 Thread walter valenti
No, get($url) does'nt cache. Walter > hi, > > offhand does anybody know if get ($url) does any sort of cacheing of the > contents of the url? if it does, how do you turn cacheing off? > > thanks, > > -- drew > [EMAIL PROTECTED] > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additi