RE: accessing referenced array from subroutine

2006-06-20 Thread extern . Lars . Oeschey
I'm still fighting with that little program, mostly again with scoping. I tried to write it the way most of you recommended, passing variables to the subroutines. Now my problem is, I get a value back, but then it's gone: my $cgi = CGI-new(); if ( $cgi-param('select_dir') ) { my $sessionids =

RE: accessing referenced array from subroutine

2006-06-20 Thread Brian Raven
[EMAIL PROTECTED] wrote: I'm still fighting with that little program, mostly again with scoping. I tried to write it the way most of you recommended, passing variables to the subroutines. Now my problem is, I get a value back, but then it's gone: my $cgi = CGI-new(); if (

RE: accessing referenced array from subroutine

2006-06-20 Thread extern . Lars . Oeschey
my $cgi = CGI-new(); if ( $cgi-param('select_dir') ) { my $sessionids = List_Sessions($server); # here $sessionids is filled, it's a hashref } elsif ( $cgi-param('select_files') ) { Kill_Sessions($sessionids); # this $sessionids is empty though... } else {

Re: Install problem on W2K3 + IIS

2006-06-20 Thread David Stanaway
I found the cause of the problem, it is detailed here: http://beta.fogbugz.com/default.asp?fogbugz.4.7553.7 Deleting the invalid script mime mappings fixed the problem. 1) The installer should not create an invalid entry 2) The uninstaller should remove them I hope this gets fixed in a future

RE: accessing referenced array from subroutine

2006-06-20 Thread Bowie Bailey
[EMAIL PROTECTED] wrote: I'm still fighting with that little program, mostly again with scoping. I tried to write it the way most of you recommended, passing variables to the subroutines. Now my problem is, I get a value back, but then it's gone: my $cgi = CGI-new(); if (

RE: accessing referenced array from subroutine

2006-06-20 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: ::: my $cgi = CGI-new(); ::: if ( $cgi-param('select_dir') ) { ::: my $sessionids = List_Sessions($server); ::: # here $sessionids is filled, it's a hashref ::: } elsif ( $cgi-param('select_files') ) { ::: Kill_Sessions($sessionids); ::: # this $sessionids

RE: accessing referenced array from subroutine

2006-06-20 Thread Deane . Rothenmaier
Uh, if I understand your question, the answer is you can't. Did you forget how an if-elsif works? If you want to kill that session in the elsif, you'll have to assign your value to $sessionids IN THE elsif clause, NOT in the if. Best wishes, Deane [EMAIL PROTECTED] Sent by: [EMAIL

RE: accessing referenced array from subroutine

2006-06-20 Thread Brian Raven
[EMAIL PROTECTED] wrote: my $cgi = CGI-new(); if ( $cgi-param('select_dir') ) { my $sessionids = List_Sessions($server); # here $sessionids is filled, it's a hashref } elsif ( $cgi-param('select_files') ) { Kill_Sessions($sessionids); # this $sessionids is empty though...

RE: accessing referenced array from subroutine

2006-06-20 Thread Deane . Rothenmaier
Bowie, Bowie, Bowie! Look at the code! The assignment's inside the IF and the usage is inside the ELSIF. IOW, if the if is true, the variable gets its assignment, but if the if statement is false, and the elsif statement is true, does the variable get used. Check it out: if ($something) { #

RE: accessing referenced array from subroutine

2006-06-20 Thread Bowie Bailey
[EMAIL PROTECTED] wrote: Bowie, Bowie, Bowie! Look at the code! The assignment's inside the IF and the usage is inside the ELSIF. IOW, if the if is true, the variable gets its assignment, but if the if statement is false, and the elsif statement is true, does the variable get used. Check it

Hash randomization - keys returning same order in successive runs

2006-06-20 Thread Paul Gowers
Hi All I am struggling to get keys to randomize the order that it returns the key list between successive runs. My understanding was that in 5.8.1 and later, successive calls to keys would give the hash keys in different order, but I cannot get this to work. My test case is:

which .pm pkg is being used?

2006-06-20 Thread Beck, Joseph
I have a program that uses 6 different modules. Some there is only 1 pm in my path and others have multiple. Is there a way to determine which module is being used? Im guessing its based on the perl library path, but not sure. I helped some developers get this program working on

RE: Hash randomization - keys returning same order in successive runs

2006-06-20 Thread Jan Dubois
On Tue, 20 Jun 2006, Paul Gowers wrote: I am struggling to get keys to randomize the order that it returns the key list between successive runs. My understanding was that in 5.8.1 and later, successive calls to keys would give the hash keys in different order, but I cannot get this to work. My

Re: which .pm pkg is being used?

2006-06-20 Thread Andreas Pürzer
Beck, Joseph schrieb: [snip] Is there a perl switch I can add that will display all the modules being used? Or another way to get this info OTOH I think you'd want to look at %INC in perlvar. Hope this helps, Andreas Pürzer -- perl -mAcme::JAPH

Re: which .pm pkg is being used?

2006-06-20 Thread Eric Hanchrow
Beck, == Beck, Joseph [EMAIL PROTECTED] writes: Beck Is there a way to determine which module is being used? Examine the hash %INC like this use Data::Dumper; print Data::Dumper-Dump ([\%INC], [qw(INC)]); -- you'll see something like this: $INC = {

RE: which .pm pkg is being used?

2006-06-20 Thread Bertrand, Jean-Marc
Joseph, Yes. Use the %INC global hash which has module names as keys and their full path as values. Jean-Marc From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Beck, JosephSent: Tuesday, June 20, 2006 3:26 PMTo: activeperl@listserv.ActiveState.comSubject: which .pm pkg is

Re: which .pm pkg is being used?

2006-06-20 Thread Eric Amick
On Tue, 20 Jun 2006 11:43:23 -0700, you wrote: I have a program that uses 6 different modules. Some there is only 1 pm in my path and others have multiple. Is there a way to determine which module is being used? I'm guessing its based on the perl library path, but not sure. The %INC hash has