Re: TIMTOWTDI

2002-05-13 Thread bob ackerman
On Monday, May 13, 2002, at 10:40 AM, Todd Wade,,,Room 108 wrote: > Bob Ackerman wrote: > >> >> this one wins the prolix award of the solutions we have seen today. >> we dare a non-perl programmer to believe this could mean something. >> I'm not sure i believe it means whatever. especially (?)(

Re: TIMTOWTDI

2002-05-13 Thread John W. Krahn
Todd Wade wrote: > > John W. Krahn wrote: > > > Todd Wade wrote: > > > > Why remove everything you don't want, why not just capture the data you > > do want? > > sure > > >> $weather =~ tr/[A-Z]\n/[a-z] /; > > ^ ^ ^ ^ > > Why are you translating a '[' to '[' and ']

Re: TIMTOWTDI

2002-05-13 Thread Todd Wade,,,Room 108
Bob Ackerman wrote: > > this one wins the prolix award of the solutions we have seen today. > we dare a non-perl programmer to believe this could mean something. > I'm not sure i believe it means whatever. especially (?)(.) - zero or one > character followed by a character? > followed by a non-

Re: TIMTOWTDI

2002-05-13 Thread Todd Wade,,,Room 108
John W. Krahn wrote: > Todd Wade wrote: > > Why remove everything you don't want, why not just capture the data you > do want? sure > >> $weather =~ tr/[A-Z]\n/[a-z] /; > ^ ^ ^ ^ > Why are you translating a '[' to '[' and ']' to ']'? Why are you > translating "\n

Re: TIMTOWTDI

2002-05-12 Thread John W. Krahn
Todd Wade wrote: > > This sub grabs http://weather.noaa.gov/pub/data/forecasts/zone/oh/ohz021.txt > with LWP::Simple, extracts the current weather conditions out of the heading > and future forecast, Lowercases the entire string, uppercases the first word > in every sentence, and returns the stri

Re: TIMTOWTDI

2002-05-12 Thread bob ackerman
On Sunday, May 12, 2002, at 11:08 PM, Todd Wade wrote: > > "JosÈ nyimi" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> The Perl slogan is: "There Is More Than One Way To Do It". >> >> I'm interested to see how you will do the small convertion below. > > T

Re: TIMTOWTDI

2002-05-12 Thread Todd Wade
"José nyimi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The Perl slogan is: "There Is More Than One Way To Do It". > > I'm interested to see how you will do the small convertion below. This sub grabs http://weather.noaa.gov/pub/data/forecasts/zone/oh/ohz0

Re: TIMTOWTDI

2002-05-12 Thread Paul Johnson
On Sun, May 12, 2002 at 07:14:27PM +0200, José Nyimi wrote: > I'm interested to see how you will do the small convertion below. > > sub convert { > my($in)=@_; > $in=~/(.)(.*)/; > $in=uc($1).lc($2); > return $in; > } > > The task is simply to upercase the first char of a given string and >

Re: TIMTOWTDI

2002-05-12 Thread John W. Krahn
José nyimi wrote: > > Hello All, Hello, > The Perl slogan is: "There Is More Than One Way To Do It". > > I'm interested to see how you will do the small convertion below. > > Here is one of mine: probably not the best one :-). > > #!/usr/bin/perl > use strict; > use warnings; > > my $out=&c

Re: TIMTOWTDI

2002-05-12 Thread Chris Ball
> "jn" == josenyimi <[EMAIL PROTECTED]> writes: jn> The task is simply to upercase the first char of a given string jn> and lowercase the rest. $string = ucfirst lc $string; Nice try, though. :-) - Chris. -- $a="printf.net"; Chris Ball | chris@void.$a | www.$a | finger: chris@$a