Re: data structure for Template Toolkit

2018-10-31 Thread Rick T
Linux > On Oct 31, 2018, at 6:21 AM, Mike Flannigan wrote: > > > Are you on Linux or using Strawberry Perl? > I used Activestate for 15+ years and I was surprised > by how easy it was to move to Strawberry Perl about > 3 years ago. It's pretty darn easy to install modules > with Strawberry

Re: data structure for Template Toolkit

2018-10-31 Thread Mike Flannigan
Are you on Linux or using Strawberry Perl? I used Activestate for 15+ years and I was surprised by how easy it was to move to Strawberry Perl about 3 years ago.  It's pretty darn easy to install modules with Strawberry Perl and seems to work every time. Mike Uri, thanks for the boatload of us

Re: data structure for Template Toolkit

2018-10-30 Thread perl
Thanks, Brandon! I’m hosted at FutureQuest.net , which has Linux servers. So, nothing oddball or demanding about the environment. But my familiarty with Unix/Linux programming is almost nil, so I sweat over stuff that would seem clear to most programmers. — Rick > On O

Re: data structure for Template Toolkit

2018-10-30 Thread Brandon McCaig
Sorry for the noise. This reply was intended for on-list, but apparently I'm a bit rusty and hit the wrong key. On Tue, Oct 30, 2018 at 02:41:46PM -0400, Brandon McCaig wrote: > On Tue, Oct 30, 2018 at 07:34:11AM -0500, Rick T wrote: > > Still, if anyone can point me to a “beginners guide” to usin

Re: data structure for Template Toolkit

2018-10-30 Thread perl
Looks like a good place to start. When I get the courage, I’ll plunge in! — Rick > On Oct 30, 2018, at 12:40 PM, Shlomi Fish wrote: > > Hi Rick, > > On Tue, 30 Oct 2018 07:34:11 -0500 > Rick T mailto:p...@reason.net>> wrote: > >> Uri, thanks for the boatload of useful suggestions! I will am b

Re: data structure for Template Toolkit

2018-10-30 Thread Rick T
Uri, thanks for the boatload of useful suggestions! I will am busying myself with understanding and applying them. Regarding Template::Simple, this module isn’t among the many that my host has installed, and I have not had success trying to learn how to install stuff from CPAN. Fortunately I’m

Re: data structure for Template Toolkit

2018-10-29 Thread Uri Guttman
On 10/28/18 4:45 PM, Rick T wrote: As a novice in perl I realize that it’s a bit presumptuous for me to attempt references and complex data structures. But I had a need and gave it a shot — a failing shot. I’ve been fiddling with my failure, almost mindlessly, all weekend; now I need some help.

Re: data structure for Template Toolkit

2018-10-29 Thread perl
Many thanks to Andrew and Mike — your suggestions worked and gave me a lot to think about as well! That’s what love about this mailing list: I always learn a lot! Rick Triplett > I hope somebody has replied already. > If not, in general you are reading data from DATA, > creating an array and

Re: data structure for Template Toolkit

2018-10-29 Thread Mike Flannigan
I hope somebody has replied already. If not, in general you are reading data from DATA, creating an array and a hash, and then creating an html file using the Template Toolkit. I think much of it looks good, but I see no use Template::Toolkit or anything similar. Do you have that?  I suspect you

Re: data structure for Template Toolkit

2018-10-28 Thread Andrew Solomon
Hi Rick, The bug is that you're calling my %list = (list => \@courses); when you should be calling my %list = (courses => \@courses); If only there were 'strict' and 'warnings' for Template! :-) Andrew On Sun, Oct 28, 2018 at 8:52 PM Rick T wrote: > As a novice in perl I realize that it’s

Re: Data structure key as a literal string

2006-04-06 Thread Chas Owens
On 4/6/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > > > >You should consider RTFM'ing. > > > Hello,what's RTFM then? snip Read The Furnished Materials Read The Fine Manual Read The F'ing Manual etc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data structure key as a literal string

2006-04-06 Thread Jeff Pang
> >You should consider RTFM'ing. > Hello,what's RTFM then? -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data structure key as a literal string

2006-04-06 Thread Chas Owens
On 4/6/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Thu, 2006-06-04 at 19:48 -0700, Randal L. Schwartz wrote: > > Perl interpreter: me reading the answer to them from the Fine Manual. > > OK, I'll bite. What's a 'Fine Manual?" (You're not going to charge me > money for this, are you?) sni

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 19:48 -0700, Randal L. Schwartz wrote: > Perl interpreter: me reading the answer to them from the Fine Manual. OK, I'll bite. What's a 'Fine Manual?" (You're not going to charge me money for this, are you?) -- __END__ Just my 0.0002 million dollars worth, --- Shawn

Re: Data structure key as a literal string

2006-04-06 Thread Randal L. Schwartz
> "Ryan" == Ryan Gies <[EMAIL PROTECTED]> writes: Ryan> Now I'm confused, what's the difference between a Perl interrupter and a Ryan> Perl interpreter? Or, what perldoc is that info in? Perl interrupter: someone who IM's me with a Perl question. Perl interpreter: me reading the answer to th

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 16:06 -0500, JupiterHost.Net wrote: > my $fruit = $hash->{'food'}{'fruit'}[0]; > print "Name: $fruit->{'name'}\n", "Color: $fruit->{'color'}\n"; That should be: my $fruit = $hash{'food'}{'fruit'}[0]; 'hash' is a real hash, not a reference. -- __END__ Just my 0.000

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 14:38 -0700, Ryan Gies wrote: > Now I'm confused, what's the difference between a Perl interrupter and a > Perl interpreter? Or, what perldoc is that info in? Oops. You are correct. That should have been 'interpreter'. -- __END__ Just my 0.0002 million dollars worth

Re: Data structure key as a literal string

2006-04-06 Thread Ryan Gies
Now I'm confused, what's the difference between a Perl interrupter and a Perl interpreter? Or, what perldoc is that info in? Thanks Mr. Shawn H. Corey wrote: On Thu, 2006-06-04 at 13:10 -0700, Ryan Gies wrote: With the intention of optimization, I am looking for a way around using *eval* in

Re: Data structure key as a literal string

2006-04-06 Thread JupiterHost.Net
Ryan Gies wrote: With the intention of optimization, I am looking for a way around using *eval* in the below snippet at line 19: my $value = eval $key; The objective is to get from $key to $value, knowing that $key is a literal string. Thank you for an insights! #!/usr/bin/perl -w

Re: Data structure key as a literal string

2006-04-06 Thread Mr. Shawn H. Corey
On Thu, 2006-06-04 at 13:10 -0700, Ryan Gies wrote: > With the intention of optimization, I am looking for a way around using > *eval* in the below snippet at line 19: > > my $value = eval $key; Please say this is a late April Fool's joke. Your suggested use of eval is not optimal. This is

RE: Data Structure Question

2003-07-07 Thread Gupta, Sharad
Instead of: print "obj:$obj->order_number($order_num)\n"; Try: print "obj: " . $obj->order_number($order_num) . "\n"; If u use a reference as a string it would give its reference type, the package and the location. -sharad -Original Message- From: Trevor Morrison [mailto:[EMAIL PROT

RE: Data Structure

2003-01-30 Thread Paul Kraus
Perfect thanks! -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 10:28 AM To: '[EMAIL PROTECTED]'; Perl Subject: RE: Data Structure >The problem is I can > figure out > what data structure to build. It would need to co

RE: Data Structure

2003-01-30 Thread Kipp, James
>The problem is I can > figure out > what data structure to build. It would need to contain the year, the > item code description sales and qty I thought I would name the > structures after the vendor. So all BAUE00 would be in one structure. > > I am just learning how to build anything beyond a

Re: data structure

2002-05-06 Thread Jonathan E. Paton
> >> >http://www.wetware.com/drieux/CS/lang/Perl/Beginners/BenchMarks/complexArrayHash_v_loop. > >> txt > >> > >> for the details on the comparison > >> > >> looks like the double loop is faster but it may not be > >> in some other configuration of data... > > > > The dereference is proba

Re: data structure

2002-05-06 Thread drieux
On Sunday, May 5, 2002, at 11:24 , Jonathan E. Paton wrote: >> >> >http://www.wetware.com/drieux/CS/lang/Perl/Beginners/BenchMarks/complexArrayHash_v_loop. >> txt >> >> for the details on the comparison >> >> looks like the double loop is faster but it may not be >> in some other configu

Re: data structure

2002-05-06 Thread Chas Owens
On Sun, 2002-05-05 at 18:47, drieux wrote: > > On Sunday, May 5, 2002, at 03:07 , Jonathan E. Paton wrote: > [..] > > print join (" ", @hash{qw}); > > sick, but it works No, this is sick: #array interpolation uses ' ' to join print "@hash{qw}\n"; > > > Appears the array symbol is requi

RE: data structure

2002-05-06 Thread Bob Showalter
> -Original Message- > From: drieux [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 05, 2002 5:14 PM > To: [EMAIL PROTECTED] > Subject: Re: data structure > > On Sunday, May 5, 2002, at 12:17 , Jonathan E. Paton wrote: > > > following is a shorter r

Re: data structure

2002-05-05 Thread Jonathan E. Paton
> hence since we are playing the > > @hash{@keys_oh_hash}; > > game we don't want to get that confused with the "->" component > > >http://www.wetware.com/drieux/CS/lang/Perl/Beginners/BenchMarks/complexArrayHash_v_loop. > txt > > for the details on the comparison > > looks lik

Re: data structure

2002-05-05 Thread drieux
On Sunday, May 5, 2002, at 03:07 , Jonathan E. Paton wrote: [..] > print join (" ", @hash{qw}); sick, but it works > Appears the array symbol is required, and probably the above would need to > be changed to: > > print join (" : ", @{%$_}->{qw}) . "\n" for @$cfgs; One Clump over the line -

Re: data structure

2002-05-05 Thread Jonathan E. Paton
> > And also there is no need to quote hash keys, and if $inner is just a > > hash reference then the > > following is a shorter replacement: > > > > print join (" : ", $_->{qw}) . "\n" for @$cfgs; > > I have not been able to get any variant of this to work. Try this FAR simplier case, which do

Re: data structure

2002-05-05 Thread drieux
On Sunday, May 5, 2002, at 12:17 , Jonathan E. Paton wrote: > And also there is no need to quote hash keys, and if $inner is just a > hash reference then the > following is a shorter replacement: > > print join (" : ", $_->{qw}) . "\n" for @$cfgs; I have not been able to get any variant of thi

Re: data structure

2002-05-05 Thread John West
The print was just there as an example - what is done with those values is actually a little more complex. I like using quoted hash keys because they show up better in the syntax-aware editor I use. I did try this before I sent the message, but in the original block of code. I think somehow in

Re: data structure

2002-05-05 Thread Jonathan E. Paton
> Did you try it? You are right, the second foreach is totally redundant. > > > foreach my $item ( @$cfgs ) > > { > > foreach my $inner ( $item ) > > { > > print "$inner->{'dir'} : $inner->{'tpl'} : $inner->{'ext'} : >$inner->{'rgx'}\n"; > > } > > The only effect the second

Re: data structure

2002-05-05 Thread Paul Johnson
On Sun, May 05, 2002 at 11:37:20AM -0700, John West wrote: > The environment here is to complex and relies on > proprietary vendor tools which I can't send, so here's > a chunk. I'm trying to figure out if the second > foreach is really required in the code below - > preferably there is a way to

Re: Data structure for handling Binary Data

2001-10-22 Thread Jason Ostrom
Perl gurus, Thank you to all of the people who helped me out. I'm right up to the end and think I know what I need to do now in order to send the binary data stream across the socket. I am using "pack" to send 10 bytes of data as a stream, but the problem is that pack isn't working as I'm tryin