Re: html - timtowtdi

2006-07-07 Thread Tom Allison
Thomas Bätzler wrote: Tom Allison <[EMAIL PROTECTED]> wrote: OK, perl almost has a problem with how many different ways to make web pages. I was looking around for something that was simple but mostly fast and "common" You might also want to check out Embperl and Mason - the latter being

Re: html - timtowtdi

2006-07-06 Thread OROSZI Balázs
Tom Allison wrote: OK, perl almost has a problem with how many different ways to make web pages. I was looking around for something that was simple but mostly fast and "common" (meaning I'll find mention of it in job postings some day...). Template and HTML::Template seem to be some pretty

RE: html - timtowtdi

2006-07-06 Thread Thomas Bätzler
Tom Allison <[EMAIL PROTECTED]> wrote: > OK, perl almost has a problem with how many different ways to > make web pages. > > I was looking around for something that was simple but mostly > fast and "common" You might also want to check out Embperl and Mason - the latter being an extension buil

html - timtowtdi

2006-07-06 Thread Tom Allison
OK, perl almost has a problem with how many different ways to make web pages. I was looking around for something that was simple but mostly fast and "common" (meaning I'll find mention of it in job postings some day...). Template and HTML::Template seem to be some pretty good starting points

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > I have a list of names, separated by the '/' character in a variable, $list, > and a name in the variable $name. If the name appears in the list, I want to > remove it and clean up $list. It takes me 4 calls to s///, and it looks > clunky. I have a feeling that some

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Jason Tiller
Hi, Mark, :) On Wed, 11 Dec 2002 [EMAIL PROTECTED] wrote: > I have a list of names, separated by the '/' character in a > variable, $list, and a name in the variable $name. If the name > appears in the list, I want to remove it and clean up $list. It > takes me 4 calls to s///, and it looks clu

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
> I apologize for the confusion, that was in response to Frank's suggestion > that didn't have the leading '/' question-marked. Sorry...I misunderstood your OP...here is a solution that should work $list =~ s!(/)?\b$name\b(/)?!$2 ? ($1||'') : ($2||'')!e; Tanton -- To unsubscribe, e-mail: [EM

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread MarkAllanAnderso
In a message dated 12/11/2002 12:27:41 PM Pacific Standard Time, [EMAIL PROTECTED] writes: > > If it's on the front, it won't remove it because it doesn't have a > preceeding > > / in that case. > > 'm confused...according to your first post: I apologize for the confusion, that was in response

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
> If it's on the front, it won't remove it because it doesn't have a preceeding > / in that case. I'm confused...according to your first post: >$list =~ s|$name||; # remove $name from the list if it's in the list >$list =~ s|//|/|; # if $name was in the middle of the list, it would have >left beh

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread MarkAllanAnderso
In a message dated 12/11/2002 12:00:43 PM Pacific Standard Time, [EMAIL PROTECTED] writes: > How about this: > > $list =~ s|/$name||; > $list =~ s|^/||; > > If it's at the end, it will remove the last /. > If it's in the middle it will fill in correctly. > If it's

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
PM Subject: Re: Removing a name from a list - advanced regexp - TIMTOWTDI > Forget that...this works in all cases: > > $list =~ s|((?!.)/)\b$name\b/?||; > > - Original Message - > From: "Tanton Gibbs" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
rom a list - advanced regexp - TIMTOWTDI > > In a message dated 12/11/2002 11:54:48 AM Pacific Standard Time, > > [EMAIL PROTECTED] writes: > > > > > > > What about just > > > $list =~ s|/?$name/?|| > > > > If $name appears in the middle of the list,

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
> In a message dated 12/11/2002 11:54:48 AM Pacific Standard Time, > [EMAIL PROTECTED] writes: > > > > What about just > > $list =~ s|/?$name/?|| > > If $name appears in the middle of the list, this removes both '/' characters. > This was my first guess as well. Ah, didn't think about that one :)

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread MarkAllanAnderso
In a message dated 12/11/2002 11:54:48 AM Pacific Standard Time, [EMAIL PROTECTED] writes: > What about just > $list =~ s|/?$name/?|| If $name appears in the middle of the list, this removes both '/' characters. This was my first guess as well. > But you should be careful about that in case

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Frank Wiles
.--[ [EMAIL PROTECTED] wrote (2002/12/11 at 14:49:15) ]-- | | I have a list of names, separated by the '/' character in a variable, | $list, and a name in the variable $name. If the name appears in the | list, I want to remove it and clean up $list. It takes me 4 calls to |

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Tanton Gibbs
December 11, 2002 2:49 PM Subject: Removing a name from a list - advanced regexp - TIMTOWTDI > I have a list of names, separated by the '/' character in a variable, $list, > and a name in the variable $name. If the name appears in the list, I want to > remove it and clean up $

Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread MarkAllanAnderso
I have a list of names, separated by the '/' character in a variable, $list, and a name in the variable $name. If the name appears in the list, I want to remove it and clean up $list. It takes me 4 calls to s///, and it looks clunky. I have a feeling that someone out there on this list will k

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

TIMTOWTDI

2002-05-12 Thread José Nyimi
Hello All, 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=&convert('abCdE'); print "$out\n"; sub convert { my(