Re: Searching problem in list of lists

2006-05-17 Thread David Romano
Hello, On 5/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello, I'm not a Perl guru so I (still) have problems :-) I use the following date structure, quite "classic" : a list of lists. I have two instances of this structure, let's take a simple example : list 1 : [ [toto,tata],[toto,tit

Re: Print

2006-05-18 Thread David Romano
Hi Kaushal, On 5/18/06, Kaushal Shriyan wrote: I have perl.chm file Learning Perl, How do i print all the chapters and all pages in the perl.chm file How did you get the book in .chm format? I only know of it being available on paper and on safari.oreilly.com. It's a great book (I learned from i

Re: Better way to add one line at top of every file(one liner)

2006-05-19 Thread David Romano
Hi Ankur, On 5/18/06, Ankur Gupta wrote: perl -0777 -p -i -e 'print "abcdefgh\n"' *.ext or perl -0777 -p -i -e 's#^#abcdefgh\n#' *.ext or ??? I did this: perl -p -i -e '$_ = ($ARGV ne $f && $f = $ARGV) ? "NEW FIRST LINE\n$_" : $_' *.ext I needed to check if I'm on the first line of a file and

Re: Need information for Tcl/tk

2006-05-19 Thread David Romano
Hi Hridyesh, On 5/18/06, hridyesh pant <[EMAIL PROTECTED]> wrote: Hi, I want to start Tcl/tk,Can anybody guide me good book or link for the beginner. Googling "tk perl" came up with these: http://www.perl.com/pub/a/2001/03/gui.html http://www.perl.com/pub/a/1999/10/perltk/index.html http://www.p

Re: could not find ParserDetails.ini in D:/usr/site/lib/XML/SAX

2006-05-19 Thread David Romano
Hi Octavian, On 5/19/06, Octavian Rasnita wrote: When using some modules for parsing RSS files or when using the PPM utility, sometimes appears the following warning: could not find ParserDetails.ini in D:/usr/site/lib/XML/SAX What can I do for avoiding that warning? You should search the web

Re: Better way to add one line at top of every file(one liner)

2006-05-19 Thread David Romano
On 5/19/06, Luke Bakken <[EMAIL PROTECTED]> wrote: On 5/19/06, David Romano <[EMAIL PROTECTED]> wrote: > Hi Ankur, > On 5/18/06, Ankur Gupta wrote: > > perl -0777 -p -i -e 'print "abcdefgh\n"' *.ext > > or > > perl -0777 -p -i -e 's#^#

Re: Help: Need PPT document for Perl Training

2006-05-19 Thread David Romano
Hi Japerlh, On 5/19/06, Japerlh <[EMAIL PROTECTED]> wrote: I am going to deliver a training about Perl programming to a group of persons. I was wondering where I can get some PPTs to help to promote the training. Have you thought of gleaning stuff from learn.perl.org? Maybe using http://perldoc.

Re: reg exp speed?

2006-05-19 Thread David Romano
Hi Alan, On 5/19/06, Alan Campbell wrote: hello folks, I'm slurping in a large file and seeing a nice speedup versus line by line processing...but I'm losing it in my (likely poorly constructed!) reg-expression match I do: - # # look for potentially problematic code of the followi

Re: Socket Problems

2006-05-22 Thread David Romano
Hi Practical Perl, On 5/22/06, Practical Perl wrote: Hello,lists, We write a simple socket script using IO::Socket module.When this script connect to peer server (both server and my scripts are in the same LAN),it always dropped and print these errors: IO::Socket::INET: connect: Connection refu

Re: Looking for example Perl scripts to be used in Perl Training.

2006-05-22 Thread David Romano
Hi Chandru, - Show quoted text - On 5/22/06, Chandru wrote: Hi I have looked some example scripts in Perl. I would like to have some pdfs or chms to guide myself.Can any one has such books. - Chandru Ryan Frantz wrote: > >> -Original Message- >> From: Chandru [mailto:[EMAIL PROTECTED]

Re: Looking for example Perl scripts to be used in Perl Training.

2006-05-22 Thread David Romano
Hi Chandru, On 5/22/06, Chandru wrote: Hi I have looked some example scripts in Perl. I would like to have some pdfs or chms to guide myself.Can any one has such books. - Chandru Ryan Frantz wrote: > >> -Original Message- >> From: Chandru [mailto:[EMAIL PROTECTED] >> Sent: Monday, May

Re: help in regular expression

2006-06-01 Thread David Romano
Hi Irfan, On 6/1/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: Hi , I am using following code #!/usr/local/bin/perl # Main program use warnings; use strict; my $file = "c:\backup.pl"; open(FH,$file) || die " can't open a file"; my $pattern = '\w\s\w'; my $input = <>; print "yes got th

Re: help in regular expression

2006-06-01 Thread David Romano
Hi Ruud, On 6/1/06, Dr.Ruud <[EMAIL PROTECTED]> wrote: "David Romano" schreef: > [ $pattern = '\w\s\w' ] > You also need to [...] escape the slashes for the pattern you're > using I don't think that is needed: (1) perl -le '$re = q{\w\s\w}

Re: Scraping

2006-06-01 Thread David Romano
Hi kc68, On 6/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm not getting past printing to the screen and to a file the page in the script below but without the list of names in the middle. Without the if line I get an endless scroll. I want to be able to pull in all names and then isol

Re: Scraping

2006-06-01 Thread David Romano
Hi Ken, On 6/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: The second option worked to print Abercrombie, Neil to the screen. Still working on basic concepts. The split construction was suggested by someone as a way to get to pulling in all listings and ultimately all votes. All votes? Yo

Re: command execution

2006-07-25 Thread David Romano
Hi Irfan, On 7/24/06, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: Hi All, I am executing following command ` $MT chreplica`; I need to find out wheather this command is executing properly or not. From what I remember `` gives the output of the command pass in, and since it looks like you'

Re: regular expression question

2006-09-06 Thread David Romano
chen li wrote on Wed, Sep 06, 2006 at 08:23:42PM PDT: > --- Adriano Ferreira <[EMAIL PROTECTED]> wrote: > > On 9/6/06, chen li <[EMAIL PROTECTED]> wrote: > > > I need a regular expression to process some data > > but > > > get stuck. I wonder if anyone here might have a > > clue. > > > > > > input

Re: regular expression question

2006-09-08 Thread David Romano
chen li wrote on Fri, Sep 08, 2006 at 09:34:03AM PDT: > One more question about this regex: > > @data = m/(\D+[^\d\s]|\d+)/g; > > I check Programming Perl or perldoc they say ^ is used > as an anchor meaning "start/begining with". But here > looks like it has a different usage. Is that right? Yes

Re: File::find with no_chdir

2006-09-18 Thread David Romano
Beginner wrote on Mon, Sep 18, 2006 at 03:24:08PM PDT: > On 18 Sep 2006 at 15:05, John W. Krahn wrote: > > opendir my $dh, $dir or die "Cannot open '$dir' $!"; > > > > print "$dir\n", > > map !/\A\.\.?\z/ && -d "$dir/$_" ? "$dir/$_\n" : (), > > readdir $dh; > > > > John > > That's lo