Problem with regular expression

2005-12-14 Thread Andrej Kastrin
Hi all I have a list of terms and I have to find out, if any one of them occur in my text. Example: term is e.g. ABCB1 wich is store in variable $w and my regular expression is "...if /^TI.*?\s$w\s/m..." .That way I successfully found ABCB1, but if the therm is parenthesize (e.g. (ABCB1)) t

Re: Problem with regular expression

2005-12-14 Thread Dr.Ruud
Andrej Kastrin schreef: > /^TI.*?\s$w\s/ /^TI.*?\s\Q$w\E\s/ See `perldoc perlre`, look for 'quoted strings'. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem with regular expression

2005-12-14 Thread John Doe
Andrej Kastrin am Mittwoch, 14. Dezember 2005 08.54: > Hi all > > I have a list of terms and I have to find out, if any one of them occur > in my text. Example: > > term is e.g. ABCB1 wich is store in variable $w and my regular > expression is "...if /^TI.*?\s$w\s/m..." .That way I successfully fo

RE: Problem with regular expression

2005-12-14 Thread Moon, John
-Original Message- From: Andrej Kastrin [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 2:55 AM To: beginners@perl.org Subject: Problem with regular expression Hi all I have a list of terms and I have to find out, if any one of them occur in my text. Example: term is e.g.

RE: DBI problem

2005-12-14 Thread Charles K. Clarkson
john wrote: : I can't see it in emacs. : What do you mean by "dump the last line of the file in binary"? I don't use emacs, but if you open the file in a hex editor you can view each character and see how your lines and files end. HTH, Charles K. Clarkson -- Mob

Table extract using HTML::TableExtract

2005-12-14 Thread Lee Guan Boon
Hi, When trying to extract table from a HTML file, I got the warning Parsing of undecoded UTF-8 will give garbage when decoding entities at ./parse-html.pl line 14. and no output was generated. So I can go about doing to extract table from a HTML file. Please help. Attached is the code

Re: DBI problem

2005-12-14 Thread Frank Bax
At 11:07 PM 12/13/05, john wrote: I can't see it in emacs. Then my guess was off-base. What do you mean by "dump the last line of the file in binary"? Sounds like something I need to learn about. tail -2 filename | cat -v -v Displays non-printing characters so they are visible. --

Re: sort files by creation time

2005-12-14 Thread Randal L. Schwartz
> "Todd" == Todd W <[EMAIL PROTECTED]> writes: Todd> my @files = map $_->[0], Todd> sort { $b->[1] <=> $a->[1] } Todd> map [ $_, -M ], Todd> grep -f, # get only plain files Todd> glob("/mnt/qdls/MSDSIN/*"); Since the map can also serve as a grep, and we can

RE: DBI problem

2005-12-14 Thread Charles K. Clarkson
john wrote: : Yes, you're right. I changed this line: : while ((my $ref) = $sth2 ->fetchrow_hashref("$num")) {... : by removing the parameter, and quotes around 'my $ref' : : while (my $ref = $sth2 ->fetchrow_hashref()) {... : and the script works now. For t

Re: sort files by creation time

2005-12-14 Thread Jeff Pang
and we can use the _ handle to avoid stat'ing twice. Sorry,I don't know what is _ handle.Who help explain with it please,thanks. -Original Message- From: "Randal L. Schwartz" Sent: Dec 14, 2005 11:56 PM To: beginners@perl.org Subject: Re: sort files by creation time > "Todd" == Todd

Re: sort files by creation time

2005-12-14 Thread Randal L. Schwartz
> "Jeff" == Jeff Pang <[EMAIL PROTECTED]> writes: Jeff> and we can use the _ handle to avoid stat'ing twice. Jeff> Sorry,I don't know what is _ handle.Who help explain with it please,thanks. It's documented. I refuse to retype the docs for a thing. :) -- Randal L. Schwartz - Stonehenge Co

can anyone tell me the nice site to learn Perl Automation

2005-12-14 Thread Anish Kumar K.
Hi Can anyone tell me a nice site to learn perl automation. Scripts also will be fine. I searched in some sites but was not quite useful.. Thanks Anish

RE: can anyone tell me the nice site to learn Perl Automation

2005-12-14 Thread Timothy Johnson
It depends on exactly what you mean by Automation. What are you trying to do? -Original Message- From: Anish Kumar K. [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 10:49 PM To: beginners@perl.org Subject: can anyone tell me the nice site to learn Perl Automation Hi Ca