RE: lc vs. tr

2001-08-14 Thread Drew Cohan
Thanks to both Peter and register for answering my questions. -- Drew. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 1:07 PM To: Drew Cohan Cc: [EMAIL PROTECTED] Subject: Re: lc vs. tr Using Benchmark.pm ... the answer is to use

lc vs. tr

2001-08-14 Thread Drew Cohan
1. Any opinions on which is better to convert characters into lowercase (efficiency, speed, etc)? lc vs. tr /A-Z/a-z/ ? 2. Is there an option to tell tr to ignore case? as in: tr/abc/222/i; #translates regardless of case 3. If #2 isn't possible, how would you use lc to convert to lowerc

HTTP::Status status_message($rc) & LWP::Simple

2001-06-22 Thread Drew Cohan
How would I adapt the else print statement to use HTTP::Status status_message($rc)? TIA drew -- snip -- use LWP::Simple; while (<>){ if (get $_) { # url is ok print; } else { # couldn't get url print "\nAn error occured with $_\n";

fastest method to check if a URL is alive

2001-06-21 Thread Drew Cohan
Hi, Could some kind soul please tell me why the following prints nothing for valid URLs? I'm trying to write a small, tight, and very fast script that'll check to see if a URL is alive in the least amount of time possible (and avoid using PING). I need to check thousands of URLs. It seems to m

Re: Please suggest a better method...

2001-06-18 Thread Drew Cohan
Thanks, very helpful! -- Drew. --- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Jun 18, Drew Cohan said: > > >while (<>){ > > s/[abc]/2/gi; > > # 3-8 left out for brevity > > s/[wxy]/9/gi; > >} > > > >

Please suggest a better method...

2001-06-18 Thread Drew Cohan
Hello, Can someone please suggest a better method than using while (<>){ s/[abc]/2/gi; # 3-8 left out for brevity s/[wxy]/9/gi; } to convert a list of words into numbers based on the phone keypad? thanks in advance, -- Drew Cohan [EMAIL PRO