Re: Re: Creating a hash of arrays from row data

2003-07-10 Thread Jeroen Lodewijks
I just want to say: Thanks to all, I found all posts interesting. My program immediately started to work. And I know a lot more about references. One more slightly off topic question: Is there also a mailing list for 'intermediate' perl programmers. I subscribed to [EMAIL PROTECTED] but have ye

Creating a hash of arrays from row data

2003-07-09 Thread Jeroen Lodewijks
Hi all, I could use some help with the following problem: I have rows of data (coming in from DBI) looking like this: Key1, Key2, Date_from, Date_to, Value 1, 1, 01-10-2002, 31-10-2002, value1 1, 1, 01-11-2002, 30-11-2002, value2 1, 2, 01-10-2002, 31-10-2002, value3 1, 2, 01-10-2002, 30-10-2002

Fork ?

2003-03-19 Thread Jeroen Lodewijks
Hi all, Not sure if this appropriate for the beginners list but there is no intermediate list :) I am writing a program in Perl to 'move' output from one process. The program looks in a database which contains lists of files. These files are either FTP'ed to mailed to recipients. I actually ma

RE: Test for empty list

2003-03-10 Thread Jeroen Lodewijks
Thanks all for the comments. Indeed I am interested in the empty list, not the print statement. I merely wanted to know if some sort special list operator existed. I am pretty sure that the code with 'last' is quicker than the ones with 'grep' but will do some tests on it. Cheers, Jeroen >===

Test for empty list

2003-03-07 Thread Jeroen Lodewijks
Hi all, Is there anybody out there who has a code snippet to test if a list is empty? (a list is empty if all elements are either undefined or 0 or have an empty string) Ofcourse I can do this: my $str = ''; my $elem; my (@test) = (undef, ''); #put any test data here foreach $elem (@test) {

How do you return values directly to some variables?

2003-03-03 Thread Jeroen Lodewijks
Hi, I have a question. I have a sub which build a hash of list values. I want to put those list values directly into some local variables but I am unable to get the syntax right. I have something like this at the moment: sub FillHash { my($db) = @_; my (%formatrules); my $lcs