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 =
[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 (
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 {
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
[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 (
[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
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
[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...
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) {
#
[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
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:
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
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
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
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 = {
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
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
17 matches
Mail list logo