Re: undefined...

2005-05-22 Thread Offer Kaye
On 5/22/05, Ley, Chung wrote: Upon further inspection of the array that I passed into the call, I find out that for some reasons, my array's last couple of elements are defined but without any values. My first thought was that somehow I might have did something like this in my code:

efficiency of hash of hashes/lists

2005-05-22 Thread Zhenhai Duan
Hi, I am wondering if the performance (time efficiency) of hash of hash is bad. I has this impression from the code I developed. Basically my structure needs to hold the members of different groups. I have different choices: hash: $groups{$g1} = $member1:$member2:$member3...; but everytime

Re: efficiency of hash of hashes/lists

2005-05-22 Thread Jeff 'japhy' Pinyan
On May 22, Zhenhai Duan said: I am wondering if the performance (time efficiency) of hash of hash is bad. I has this impression from the code I developed. Basically my structure needs to hold the members of different groups. I have different choices: hash of hash $groups{$g1}{$member1} = 1;

RE: efficiency of hash of hashes/lists

2005-05-22 Thread Charles K. Clarkson
Zhenhai Duan mailto:[EMAIL PROTECTED] wrote: : Can anyone give me some suggestions which one is better? Whichever is easiest to read is probably the better solution. Unless you are dealing with a finished program where you need additional speed, let readability be your guide. HTH, Charles

Can erpl support recursice call?

2005-05-22 Thread bingfeng zhao
Hi, everyone, I want know whether perl support recursive sub routine call? if not, howI can meet this requirement? thanks in advance. Best regards, - TOPSEC, THE

Re: Can perl support recursive call?

2005-05-22 Thread Wijaya Edward
Hi, Of course! This is the example of a script with recursive call that produces a list of the directory paths and filenames of all .htm and .shtm files contained within the subdirectory assigned to the $base variable. __BEGIN__ #!/usr/local/bin/perl $base = /home/users/myspace/html/; $delim

Re: Can erpl support recursice call?

2005-05-22 Thread John Doe
Am Montag, 23. Mai 2005 05.54 schrieb bingfeng zhao: Hi, everyone, I want know whether perl support recursive sub routine call? [..] Hi, It does: perl -le' use warnings; use strict; sub recursive { my $cnt=shift; print recursion level $cnt; recursive(++$cnt) if $cnt10; } recursive(0); '

Re: Can erpl support recursice call?

2005-05-22 Thread Wijaya Edward
That's very clever John, I'm wondering why ($cnt++) won't work instead of this recursive(++$cnt) if $cnt10; I tested it, it gave endless recursion. And what's the meaning of 0 here? Why didn't you pass 1 as for recursive(1), which is more sensible to me? Which also works. recursive(0); --

答复: Can erpl support recursice call?

2005-05-22 Thread bingfeng zhao
oh, thanks a lot. but if you declare prototype of a sub routine, like sub recursive($$), perl report main::() called too early to check prototype at sample.pl line XX. is it important and honw to avoid it? |-- |: John Doe [mailto:[EMAIL PROTECTED] |: 2005523 12:43 |:

Re: Can erpl support recursice call?

2005-05-22 Thread John Doe
Am Montag, 23. Mai 2005 06.54 schrieb Wijaya Edward: That's very clever John, I'm wondering why ($cnt++) won't work instead of this recursive(++$cnt) if $cnt10; I tested it, it gave endless recursion. Yes, spontaneosly I used $cnt++ first, too :-) ++$cnt is called pre increment - in

Re: 答复: Can erpl support recursice call?

2005-05-22 Thread John Doe
Hi Am Montag, 23. Mai 2005 06.58 schrieb bingfeng zhao: oh, thanks a lot. but if you declare prototype of a sub routine, like sub recursive($$), perl report main::() called too early to check prototype at sample.pl line XX. is it important The warning says that the prototype can not

XML::LibXML on Cygwin

2005-05-22 Thread marcos rebelo
It is possible to install this Perl module in the Cygwin. When I do 'perl Makefile.pl' the script blows up and creats the file 'perl.exe.stackdump' I changed the code of the Makefile.pl inside the 'sub backtick' from open(STDOUT, $DEVNULL); open(STDERR, $DEVNULL); my $results =