having the Hash of symbolic
: references in the main namespace so it works.
You are not using a hash of symbolic references
in A.pm. You are using a reference to a hash of code
references.
: I just need to know if PERL
Perl or perl -- never PERL!
: allows symbolic reference variab
ter but I kept getting subruotine undefined...at times in the
main:: and in the perl modules... I went around this by having the
Hash of symbolic references in the main namespace so it works...I just
need to know if PERL allows symbolic reference variables or hashs with
symbolic references to
->();
$MOD::A::b{foo3}->("pairs");
Still assuming hash references, do you mean:
$MOD::A::b->{apple}();
$MOD::A::b->{oranges}();
$MOD::A::b->{open}("pairs");
I went around this by having the Hash
of symbolic references in the main namespace so it w
.at times in the main:: and in the
perl modules... I went around this by having the Hash of symbolic references
in the main namespace so it works...I just need to know if PERL allows
symbolic reference variables or hashs with symbolic references to be access
in
quot; etc., but the dereferencing never works. An
> empty string is printed. The string "1_antwort_1" as the name of an input
> field is generated correctly, of course.
$antwort doesn't need to be a global variable, but $antwort_text_1 .. 5 do,
as symbolic references don't
David Byrne wrote:
> Okay, sorry to be somewhat unclear with my question.
> HereÂs some sample input data that may help to clear
> things up:
>
> ###
> node_id = 0
> parent_node_id = N/A
> child_node_ids = 1, 2
>
> node_id = 1
> parent_node_id = 0
> child_node_ids = 3, 4
>
>
On Feb 4, 2004, at 4:19 PM, David Byrne wrote:
Okay, sorry to be somewhat unclear with my question.
Heres some sample input data that may help to clear
things up:
See if this gets you going. It's one possible answer.
James
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $tree
either.
> My processor
> usage spikes through the roof, but it doesn't seem
> to get anywhere.
> Does this run for you?
>
> > Perhaps you could suggest a better solution.
>
> Perhaps. I know you're building some sort of hash
> tree, but I have no
>
hrough the roof, but it doesn't seem to get anywhere.
Does this run for you?
Perhaps you could suggest a better solution.
Perhaps. I know you're building some sort of hash tree, but I have no
idea why. Can you tell us what you're aiming for?
Currently I'm trying to use sy
Greetings,
Im trying to generate a tree of nested hashes [of an
arbitrary size].
Perhaps you could suggest a better solution.
Currently I'm trying to use symbolic references
according to the literature
but without much luck.
Best regards,
David
My script is as follows (for now, Ive tri
Hi Rob,
On Wednesday 07 January 2004 1:48 pm, Rob Dixon wrote:
> "Gary Stainburn" <[EMAIL PROTECTED]> wrote in message
[snip]
> You're trying to dereference $_BLOCKS as a hash reference. Use
>
> return sort keys %{"_$key"};
>
> and it should work. But note that it won't return the keys from
> th
list {
> my $self=shift;
> my $key=uc(shift);
> print "using '_$key' as hash name\n";
> return sort keys %${"_$key"};
> }
>
> which according to the section of symbolic references in perldoc perlrefs
> should work. However, while Trainset-&
st of signalboxes
sort keys %_BOXS;
}
I wanted to eliminate the duplicated code so I wrote:
sub list {
my $self=shift;
my $key=uc(shift);
print "using '_$key' as hash name\n";
return sort keys %${"_$key"};
}
which according to the section of symbolic referenc
Tom Gazzini said:
> I can call a method on an object using the following:
>
> $objref->func()
>
> However, if I try to call this using a symbolic reference:
>
> my $func_name = "$objref->func";
> &{$func_name)();
>
> then I get the following error:
>
> "Undefined subroutine &main::$objref->func c
I can call a method on an object using the following:
$objref->func()
However, if I try to call this using a symbolic reference:
my $func_name = "$objref->func";
&{$func_name)();
then I get the following error:
"Undefined subroutine &main::$objref->func called.."
The problem is that the perl
15 matches
Mail list logo