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 (?)(
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 ']
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-
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
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
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
"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
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
>
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
> "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
10 matches
Mail list logo