Luis Pachas <[EMAIL PROTECTED]> wrote:
: I keep getting a function undefined, I used require
: and exporter but I kept getting subroutine undefined.
: at times in the main:: and in the perl modules.
Exporter works fine. Perhaps you could show us what
you did?
: I went around this by having
On Jul 16, 2004, at 7:54 AM, Luis Pachas wrote:
Hi I have a problem,
I have a PM
i have this
A.pm :
package A;
my %b;
$b = {
apple => \&foo1,
oranges => \&foo2,
open => \&foo3
};
sub foo1 {
print "apples\n"
}
sub foo2 {
print "oranges\n"
}
sub foo3 {
my ($item) = @_;
print $item."\
Luis Pachas wrote:
Hi I have a problem,
I noticed several problems.
I have a PM
i have this
A.pm :
package A;
my %b;
$b = {
Must be global. And you need to decide if you want a hash or a hash
reference. I'm assuming a hash reference.
our $b = {
apple => \&foo1,
oranges => \&foo2,
ope
Jan Eden wrote:
>
> Hi all,
>
> there must be a better way to do this. My task is to create a multiple choice
> test in HTML. First, I print the question (frage):
>
> my $query = "SELECT frage_id, frage_text, antwort_text_1, antwort_text_2,
> antwort_text_3, antwort_text_4, ant
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
Okay, sorry to be somewhat unclear with my question.
Heres 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
node_id = 2
parent_node_id = 0
child_node_
On Feb 4, 2004, at 1:38 PM, David Byrne wrote:
Greetings,
Hello.
Im trying to generate a tree of nested hashes [of an
arbitrary size].
I'm trying to run the code you posted, so I can see what the heck is
going on. That's not going well for me either.My processor
usage spikes through the r
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
"Gary Stainburn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi folks,
>
> I've got the code:
>
> package Trainset;
>
> my %_BLOCKS=(); # blocks of track
> my %_TRAINS=(); # trains
> my %_BOXS=(); # signalboxes
>
> sub blocks { # Return list of blocks
> sort keys %_BLOCKS;
>
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
11 matches
Mail list logo