Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> "Uri Guttman" writes: >> i haven't looked at the previous code but why is that being cleared here >> and pushed above? i don't get the purpose of the mod counter either. it >> just seems very odd but maybe there is a purpose. i won't delve to find

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Steve Bertrand
On 2010.05.07 21:09, Harry Putnam wrote: > "Uri Guttman" writes: > >> i haven't looked at the previous code but why is that being cleared here >> and pushed above? i don't get the purpose of the mod counter either. it >> just seems very odd but maybe there is a purpose. i won't delve to find >> o

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread John W. Krahn
Harry Putnam wrote: Summary: How to arrange for a default action in a dispatch table, along with several single Letter choics and numeric choices. Details: This script is a mock up of something I'm trying to do, and is way pared down from a much larger script... mostly its the dispatch table I

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Harry Putnam
Steve Bertrand writes: > Although I've expanded this out of a dispatch table and modified it to > prevent wrap, it is extremely understandable, even without further context: > > my $v4glue = $dns->v4glue(); > my $v6glue = $dns->v6glue(); > > $self->data({ field => 'v4glue', value => $self->date

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Harry Putnam
"Uri Guttman" writes: > i haven't looked at the previous code but why is that being cleared here > and pushed above? i don't get the purpose of the mod counter either. it > just seems very odd but maybe there is a purpose. i won't delve to find > out. The mod counter being cleared was just stupi

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> On 2010.05.07 19:37, Steve Bertrand wrote: >> (fwiw, and I don't have time to get into the rest of the code right now, >> I prefer whitespace, so I'd write that as): >> >> my @ar1 = qw ( >> r2one >> r2two >> r2three # comment, reader needs

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Steve Bertrand
On 2010.05.07 19:37, Steve Bertrand wrote: > (fwiw, and I don't have time to get into the rest of the code right now, > I prefer whitespace, so I'd write that as): > > my @ar1 = qw ( > r2one > r2two > r2three # comment, reader needs info for this var >

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Steve Bertrand
On 2010.05.07 19:58, Uri Guttman wrote: >> "SB" == Steve Bertrand writes: > SB> (fwiw, and I don't have time to get into the rest of the code right now, > SB> I prefer whitespace, so I'd write that as): > > SB> my @ar1 = qw ( > SB> r2one > SB> r2two

Re: Looking for sample/demo site conforming to LAMP model ...

2010-05-07 Thread David Christensen
Dennis G. Wicks wrote: Does anybody know of a sample/demo site that uses the LAMP model, and maybe has some tutorials? Something that is easy to understand? If it also uses the Template Toolkit that would be a big plus! I'd start here: http://template-toolkit.org/ Do you have the Ba

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> On 2010.05.07 19:02, Harry Putnam wrote: >> It looks pretty awkward, the way I just kind of wedged the default >> action in there... is there a more canonical way of doing that? SB> I have to be honest ;) SB> There was a time a little while bac

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Steve Bertrand
On 2010.05.07 19:37, Steve Bertrand wrote: > On 2010.05.07 19:02, Harry Putnam wrote: > >> It looks pretty awkward, the way I just kind of wedged the default >> action in there... is there a more canonical way of doing that? > > I have to be honest ;) > > There was a time a little while back tha

Re: how to arrange a default action in a dispatch table

2010-05-07 Thread Steve Bertrand
On 2010.05.07 19:02, Harry Putnam wrote: > It looks pretty awkward, the way I just kind of wedged the default > action in there... is there a more canonical way of doing that? I have to be honest ;) There was a time a little while back that I decided that I would try hard not to troubleshoot cod

how to arrange a default action in a dispatch table

2010-05-07 Thread Harry Putnam
Summary: How to arrange for a default action in a dispatch table, along with several single Letter choics and numeric choices. Details: This script is a mock up of something I'm trying to do, and is way pared down from a much larger script... mostly its the dispatch table I'm working on right n

Re: logic not being able to score last element in the array

2010-05-07 Thread iinfer
On May 5, 1:10 pm, rbwohlfa...@gmail.com (Robert Wohlfarth) wrote: > On Tue, May 4, 2010 at 8:39 PM, iinfer wrote: > > # OPEN THE KEY > > > my @key=(); > > my @score_key=(); > > sub key{ > >    my $inFile = 'key.csv'; > >    open(IN, $inFile) or die "open $inFile: $!"; > >   �...@key=split(',',);

RE: Merging YAML nodes/streams

2010-05-07 Thread Bob McConnell
From: Tom > I'm having trouble merging YAML streams. > > Basic premise is that I load multiple YAML files and I want to combine > the result. There may be common elements within subsequent YAML files > and I would want the last loaded to be the taken value if one already > existed. > > I have tr

Merging YAML nodes/streams

2010-05-07 Thread Tom
Hi, I'm having trouble merging YAML streams. Basic premise is that I load multiple YAML files and I want to combine the result. There may be common elements within subsequent YAML files and I would want the last loaded to be the taken value if one already existed. I have tried treating the YAML

Looking for sample/demo site conforming to LAMP model ...

2010-05-07 Thread Dennis G. Wicks
Greetings; Does anybody know of a sample/demo site that uses the LAMP model, and maybe has some tutorials? Something that is easy to understand? If it also uses the Template Toolkit that would be a big plus! Many TIA! Dennis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For addi

AW: AW: Substition string in a variable?

2010-05-07 Thread HACKER Nora
Hi Eric, > I hope I understood your problem correctly. If you want to supply a > regexp > somewhere (e.g., in a config file) and get it applied somewhere in the > program, you can do that: Have a look at the qr// operator and, if > necessary, eval. Thanks for your input. Unfortunately, I have not