Re: Add: Re: Re: UPD: output table with variable data

2003-02-22 Thread Angus Lees
At Fri, 21 Feb 2003 12:59:13 +0100, Alexander Hartmaier wrote: > Because I use a hash instead of an array now I've got the problem that sorting > with an ORDER BY sql statement is useless ;_((( > > I don't want to loose the pros of using a hash (i can reference an the columns > per name and if I a

Re: Add: Re: Re: UPD: output table with variable data

2003-02-21 Thread Ed Grimm
I use the second array idea, except that I store that array in the hash, under a key that will never be a real key. In my case, all of my legitimate keys are lowercase (the database has case-insensitive keys, and I simulate this in the import by lowercasing the keys), and my array of keys (with or

Add: Re: Re: UPD: output table with variable data

2003-02-21 Thread Alexander Hartmaier
Hi! Because I use a hash instead of an array now I've got the problem that sorting with an ORDER BY sql statement is useless ;_((( I don't want to loose the pros of using a hash (i can reference an the columns per name and if I add a new one don't need to touch the others). Hast anybody an idea

Re: Re: UPD: output table with variable data

2003-02-21 Thread Alexander Hartmaier
[EMAIL PROTECTED] (Angus Lees) am 21.02.2003 03:07:09 An: [EMAIL PROTECTED] (Alexander Hartmaier) Kopie:[EMAIL PROTECTED] (Blindkopie: Alexander Hartmaier/DEBIS/EDVG/AT) Thema:Re: UPD: output table with variable data just some comments on perl/embperl style, none of which are p

Re: UPD: output table with variable data

2003-02-20 Thread Angus Lees
just some comments on perl/embperl style, none of which are particularly critical: At Thu, 20 Feb 2003 10:36:57 +0100, Alexander Hartmaier wrote: > [- use nactools; -] this would be better done as [! use nactools !], since that will only be executed once. when you use a [- -] block, perl will

UPD: output table with variable data

2003-02-20 Thread Alexander Hartmaier
Good morning list ;-) I solved my problem yesterday before any answer arrived *fg* Now I've got an 'nacadminlib.epl' which contains... ---

Re: UPD: output table with variable data

2003-02-19 Thread Ed Grimm
If you're going to call the sub in a [+ +] block, you should have the result returned, not printed. Note that, as others have mentioned, this is not the standard embperl way of doing things, but it's an option. > sub interface_list (@interfacelist) > { my $res = " > > Mon > Device

Re: output table with variable data

2003-02-19 Thread Luiz Fernando B. Ribeiro
Hi, Your aproaching is confusing and don't use the features Embperl provide you :) Use Embperl [$ subs $] when you need to output data and when it is not possible use print OUT inside your subs to print data in the correct place; About CGI.pm, you dont't need it when using Embperl. Try to use t

Re: output table with variable data

2003-02-19 Thread Ville Jungman
lt;[EMAIL PROTECTED]> Subject: output table with variable data Date: Wed, 19 Feb 2003 14:45:01 +0100 Hi list! I have to output a html table in some of my embperl pages which always looks the same but the data is slightly different. My approch was to write a small sub which takes the array w

Re: output table with variable data

2003-02-19 Thread Ville Jungman
... [+ $interfacelist[0] +] ... [* } *] ville jungman, ulvilantie 3 b 11, 00350 helsinki, finland tel. + 358 - 9 - 225 4482 , http://www.kolumbus.fi/vilmak usko Herraan Jeesukseen, niin sinä pelastut. (apt. 16:31) From: "Alexander Hartmaier" <[EMAIL PROTECTED]> To: <[EMAI

UPD: output table with variable data

2003-02-19 Thread Alexander Hartmaier
Hi again! I made a mistake at the variable passing ;-) Now this works: sub interface_list (@) { my @interfacelist = $_[0]; . . . } But it's still outputted at the end of the page instead of where I call the sub. I also don't like the print statements. Any Idea? THX Alex ##

Re: output table with variable data

2003-02-19 Thread Philip M. Gollucci
First of all, you probably want to pass the array by reference, but I think you want a hash reference in reality. aka print &interface_list(\%interfacelist); next you actually need to assign it to a local var in the function. Third, use CGI.pm or some sub class for the love of god. Next your don

output table with variable data

2003-02-19 Thread Alexander Hartmaier
Hi list! I have to output a html table in some of my embperl pages which always looks the same but the data is slightly different. My approch was to write a small sub which takes the array with the data and looks like this: ---