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

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 latest match?

How to find the element no. of Grep match?

2000-05-22 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

TRANS SUBSTITUTION

2000-05-20 Thread Jimmy S. Lim
i tried tr/\\/B\//d; to delete all the /B 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

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! Must have been

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

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 = TEST; $file =~ s/jimmy/thomas/;

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

2000-04-28 Thread Jimmy S. Lim
y any character or characters along the way UNTIL (then stop) you find an E with 3 digits plus a - or w/o a - followed by 4 digits, then return the match. but i still get return of everything. Perl seems to ignore my ?! negative look ahead. is this because of the * i have? how do i solve 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