Understanding perlop

2000-05-26 Thread Jimmy S. Lim
hi, i came across this statement while reading Perlop. I don't understand how %s is substituted w/ "s" or w/o "s" depending on the no. of dogs. %s is a hash. how is it associated w/ the ?: operator? it prints " i have 0 dogs." but if i change 1 to 0, it prints "i have 0 dog." grateful for your ti

Re: How to find the element no. of Grep match?

2000-05-25 Thread JIMMY
thanks for all the people who answered > >> i have a @list that contains elements i do not know. i'm using grep to match > >> some words inside the @list. > >> for example: > >> $match = grep /\d/, @list; > >> my question is: is there a way to find the element No. eg: $list[number] of > >> the la

How to find the element no. of Grep match?

2000-05-21 Thread JIMMY
hi perl friends, i have a @list that contains elements i do not know. i'm using grep to match some words inside the @list. for example: $match = grep /\d/, @list; my question is: is there a way to find the element No. eg: $list[number] of the latest match? thanks! --- You are currently subs

TRANS & SUBSTITUTION

2000-05-20 Thread Jimmy S. Lim
i tried tr/\<\/B\>//d; to delete all the inside the $File variable wherein i slurped the entire HTML(because i needed to read across multiple lines), but the transliteration doesn't seem to work. can anyone help? i opened the HTML file and some of them have words or characters immediately(w/o any

Re: File::Copy

2000-05-19 Thread JIMMY
pls. help me understand. what does the "!" mean below? does it mean "not"? > On 05/12/00, "[EMAIL PROTECTED]" wrote: > > Doug, while your posts are always full of useful info, you made > > a typo or two in this one. You wrote: > > > > > my @filelist = grep { !/^.+/ } readdir DIR; > > Oops! Mus

Douglas:thanks! appreciate your help!

2000-05-10 Thread Jimmy S. Lim
thanks douglas. appreciate your help man. 'wish i can be as good as you. - Original Message - From: Douglas Wilson To: Perl-Win32-Users Mailing List Sent: Tuesday, May 09, 2000 9:13 AM Subject: Re: Douglas:Newline & Carriage Return. On 05/08/00, ""Jimmy S. Lim

What does this mean?

2000-05-10 Thread Jimmy S. Lim
can someone help a newbie understand what ($i{$_} ++) means below? Thanks! while () {unless ($i{$_} ++) {push (@Unique, $_)}} --- You are currently subscribed to perl-win32-users as: [archive@jab.org] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mail

Douglas:Newline & Carriage Return.

2000-05-08 Thread Jimmy S. Lim
hi, when you want to get rid of newlines and carriage returns, is it correct to use: tr/\n&&\r//g; ? below you suggested tr/\x0a\x0d//d; what does "x0a" and "x0d" mean? where can i get a list of all these strange characters and their meaning? a few days ago, Bill suggested : tr/015d//g; to get

Re: redundant extraction. Thanks for Helping

2000-05-07 Thread Jimmy S. Lim
dennis, thanks for the help ! i can't remember if i thanked you before. - Original Message - From: Dennis Yelle To: Jimmy S. Lim Sent: Wednesday, April 26, 2000 11:54 PM Subject: Re: redundant extraction. You write:open(ABC, "TEST.html") or

read/write simultaneously?

2000-05-04 Thread Jimmy S. Lim
how do I use the s/ / / to read/match and then later to write/substitute words into the same existing file? i tried this below but it just wipes out my entire file. #!/usr/bin/perl open(TEST, ">test.txt") or die "Can't open PRICE: $!\n"; $file = ; $file =~ s/jimmy/

Capture RegExp pattern 2nd occurence match on same line-How To

2000-04-28 Thread Jimmy S. Lim
Title: RE: How to escape a "." ? hi everyone! thanks in advance for your help. i'm banging my head on this problem:   this is my text file named test.html blk. 111, 111, 111, 111, 111 ...some words...blk 222, 222   ,222, 222...some words...blk. 333,333, 333 ...some words  blk.333...blk. 444,

How to say: match this..."UNTIL..." in RegExp

2000-04-28 Thread Jimmy S. Lim
this?   jimmy

How to escape a "." ?

2000-04-27 Thread Jimmy S. Lim
hi all, how do you escape a "." (dot)? i would like do a pattern match w/ a "." within the pattern. thanks in advance! jim --- You are currently subscribed to perl-win32-users as: [archive@jab.org] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mailing List

Re: redundant extraction.

2000-04-26 Thread Jimmy S. Lim
hi! will be very grateful if anyone can spare some time to help a newbie. i wrote: open(ABC, "TEST.html") or die "Can't open TEST: $!\n";while ($line = ){    if ($line =~ /hello\s\d\d\d/ ){$hello=$&}    if ($line =~ /E\d\d\d-\d\d\d\d/ or $line =~ /E\d\d\