Re: help on comparing lines in a text file

2004-10-12 Thread Gunnar Hjalmarsson
Alden Meneses wrote: so i have a text file that looks like this 10/04/2004 UPL TZOO CME CRDN WIBC PETD SMF 10/11/2004 UPL TZOO CME WIBC PETD VNBC AMED anyway each line has 1 date field and 100 stock symbols and they are in order. I am trying to compare the different lines to see what has changed.

usage of xerces xml parser

2004-10-12 Thread E.Horn
hello! now i have found xerces , a parser module. how do i extract with this one liks, out of a xmlfile!? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Help creating a simple local gateway for testing HTTP::Request

2004-10-12 Thread Thomas Drought
Hello all, I was wondering if someone could help me. I have a script which send an HTTP::Request I would like to be able to view what it is sending. I thought I could just create use HTTP::Daemon for this, but I'm not getting any response from it. I want to see the information from the initial

Re: usage of xerces xml parser

2004-10-12 Thread Gunnar Hjalmarsson
E.Horn wrote: now i have found xerces , a parser module. how do i extract with this one liks, out of a xmlfile!? As the documentation for the module says. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: How to process blank line delimeted blocks of text?

2004-10-12 Thread Paul Lalli
Tim Musson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I keep trying to do this for different things. I have not found a method I like yet. So here is specifically what I am trying to do *this time*. My current customer has been having problems with members dropping out of

How to find the current page?

2004-10-12 Thread Cristi Ocolisan
Hi all, I designed a website, having restricted and unrestricted zones. What I'm trying to do is to redirect a user after he/she logs in, to the page where he was (i.e.: if the user was in the product's X description and he/she wants to buy it, after he/she logs in he has to be redirected to

Re: How to find the current page?

2004-10-12 Thread Chris Devers
On Tue, 12 Oct 2004, Cristi Ocolisan wrote: What I'm trying to do is to redirect a user after he/she logs in, to the page where he was (i.e.: if the user was in the product's X description and he/she wants to buy it, after he/she logs in he has to be redirected to the same page). If you

RE: in a regex- re-arrange $1..$n

2004-10-12 Thread West, William M
Are you thinking of : ( $a1,$b1,$a2,$b2,$a3,$b3,$a4,$b4,$a5,$b5 ) = $_ =~ /regexp/ ? that might be what i need- if i'm going to be working with these values alot, then i want to know what they are at the outset The result of a regexp ($1..$9) are returned in array context, so you can

RE: usage of xerces xml parser

2004-10-12 Thread Bob Showalter
E.Horn wrote: hello! now i have found xerces , a parser module. If you want to process XML with Perl, why not start here to get an overview of the topic: http://perl-xml.sourceforge.net/faq/ After you study that (see esp. section 2.1) you can come back with a more focused question. how do i

Need help in File::Stat

2004-10-12 Thread Chandrakant Reddy
Hi I wrote this simple script : #!/usr/local/bin/perl use strict ; use warnings ; use File::Stat ; my $filename = /tmp/cvr.txt ; my $stat = new File::Stat($filename) or die No $filename : $! \n; print Dev = $stat-dev \n; print Inode = $stat-ino \n; print Mode = $stat-mode \n; print

RE: Help creating a simple local gateway for testing HTTP::Reques t

2004-10-12 Thread Bob Showalter
Thomas Drought wrote: Hello all, I was wondering if someone could help me. I have a script which send an HTTP::Request I would like to be able to view what it is sending. I thought I could just create use HTTP::Daemon for this, but I'm not getting any response from it. I want to see the

RE: Need help in File::Stat

2004-10-12 Thread Bob Showalter
Chandrakant Reddy wrote: ... print Dev = $stat-dev \n; but the output is comming like this ---OUTPUT -- Dev = File::Stat=ARRAY(0x150a20)-dev Method calls don't interpolate in double quotes. So you need to write it as: print Dev = , $stat-dev, \n; Or use this trick, print Dev

cannot call a process via telnet

2004-10-12 Thread Christian Stalp
Hello together, I have certain problem with the Net::Telnet () -package. I try to call a program on a remote server over the telnet. ( I cannot use SSH in this case! ) my $command = cd /home/chris/servlist $t = new Net::Telnet (Timeout = 15,Prompt = '/\[datagate\]\/KOMM\/datagate/') or die

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
Hello together, I have certain problem with the Net::Telnet () -package. I try to call a program on a remote server over the telnet. ( I cannot use SSH in this case! ) What you have shown won't compile. Are you using 'strict' and 'warnings'? If not you need to be. my $command = cd

RE: Variable scope in wanted function

2004-10-12 Thread Ron Goral
-Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 10:39 AM To: [EMAIL PROTECTED] Subject: Re: Variable scope in wanted function From: Gunnar Hjalmarsson [EMAIL PROTECTED] Ron Goral wrote: I am having some difficulty with a

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
What you have shown won't compile. Are you using 'strict' and 'warnings'? If not you need to be. Its not the whole file. I paste some parts of the script into the mail ,renamed the variables in english ... but I also doesn't use strict. Maybe this gives me a hint of whats going wrong.

Re: Need help in File::Stat

2004-10-12 Thread John W. Krahn
Chandrakant Reddy wrote: Hi Hello, I wrote this simple script : #!/usr/local/bin/perl use strict ; use warnings ; use File::Stat ; Is there a reason that you can't use the built-in stat function or the core module File::stat? my $filename = /tmp/cvr.txt ; my $stat = new File::Stat($filename) or

RE: How to find the current page?

2004-10-12 Thread Charles K. Clarkson
Chris Devers [EMAIL PROTECTED] wrote: : You'd probably be better off embedding an identifier for the : page the user was visiting as a hidden form field that is : carried forward with the login process, /or stashed in a : cookie. Once the user has logged in, then send them to the page : that the

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
As I expact, I just fixed the scope errors but the problem remains. This is it: sub telnet_access { my $username = $main::username; my $passwd = $main::passwd; my $command_1 = cd /home/chris/servlist/; my @ra; my $rs; my $t; $t = new Net::Telnet (Timeout = 15,Prompt =

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
What you have shown won't compile. Are you using 'strict' and 'warnings'? If not you need to be. Its not the whole file. I paste some parts of the script into the mail ,renamed the variables in english ... but I also doesn't use strict. Maybe this gives me a hint of whats going

Email Address Arguments

2004-10-12 Thread Errin Larsen
Hi Perl Mongers, I'm trying to parse some command line options. I'm expecting either no arguments, email addresses or email addresses and file names/piped input. This script will take the email addresses and send the contents of a file to them, or the output of a piped command. So, I would

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
As I expact, I just fixed the scope errors but the problem remains. This is it: sub telnet_access { my $username = $main::username; my $passwd = $main::passwd; Generally we want our subroutines to be passed arguments and return values. The above has avoided the scoping symptom but not

Re: Map out a directory heirarchy

2004-10-12 Thread John W. Krahn
Harry Putnam wrote: Harry wrote: This new coding although easier to look at and probably more efficient, isn't really any faster or at least not appreciably. It still goes to each and every numbered file. John replied: In most file systems the file names are not stored in any particular order so

Re: Perl and Threads

2004-10-12 Thread Dave Gray
Mi goal is that each thread could process an element of an array that has 10 elements, so thread0 process array[0], thread1 process array[1] and so on until thread9 process array[9] Those 10 lines come from a file that Perl reads in chunks of ten lines until EOF First of all, your code

Re: Email Address Arguments

2004-10-12 Thread Wiggins d Anconia
Hi Perl Mongers, I'm trying to parse some command line options. I'm expecting either no arguments, email addresses or email addresses and file names/piped input. This script will take the email addresses and send the contents of a file to them, or the output of a piped command. So, I

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
Okay now I tryed instead of: $rs = $t-print ( ./komm-test.pl ) or die cannot execute !\n; this: $rueck_s = $t-cmd ( ./komm-test.pl ) or die Kann kein Script starten!\n; and get this message: command timed-out at Refdb.pm line 94 And this is absolutly normal because the script which is called

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
Please group reply so others can help and be helped, and to prevent getting (accidentally) ignored. Okay now I tryed instead of: $rs = $t-print ( ./komm-test.pl ) or die cannot execute !\n; this: $rueck_s = $t-cmd ( ./komm-test.pl ) or die Kann kein Script starten!\n; and get this

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
It appears from the docs that the Ccmd method can take a timeout as well. I suspect adding the '' will cause problems because the shell will return control to Net::Telnet and there will be no way to communicate with the process. Note that when you switch to include other arguments with

RE: help on comparing lines in a text file

2004-10-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Alden Meneses wrote: so i have a text file that looks like this 10/04/2004 UPL TZOO CME CRDN WIBC PETD SMF 10/11/2004 UPL TZOO CME WIBC PETD VNBC AMED anyway each line has 1 date field and 100 stock symbols and they are in order. I am trying to compare the different lines to see what has

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
It appears from the docs that the Ccmd method can take a timeout as well. I suspect adding the '' will cause problems because the shell will return control to Net::Telnet and there will be no way to communicate with the process. Note that when you switch to include other arguments

Re: Email Address Arguments

2004-10-12 Thread Errin Larsen
On Tue, 12 Oct 2004 09:26:12 -0600, Wiggins d Anconia [EMAIL PROTECTED] wrote: Hi Perl Mongers, I'm trying to parse some command line options. SNIP So in this case you have two arguments in @ARGV and waiting text on STDIN? Is it this last part that is confusing you. yes ...

Re: cannot call a process via telnet

2004-10-12 Thread mgoland
- Original Message - From: Christian Stalp [EMAIL PROTECTED] Date: Tuesday, October 12, 2004 12:18 pm Subject: Re: cannot call a process via telnet It appears from the docs that the Ccmd method can take a timeout as well. I suspect adding the '' will cause problems because the

Re: help on comparing lines in a text file

2004-10-12 Thread Rafael Morales
I did something like you want, and maybe this could help you !!!. I copy my code. foreach my $linea1 ( ARRAY1 ) { my $match = 0; my @comp = split /\|/, $linea1; foreach my $linea2 ( ARRAY2 ) { my @comp2 = split /\|/, $linea2;