On Nov 5, Tore Aursand said:
>On Tue, 04 Nov 2003 13:58:41 -0500, mgoland wrote:
>> %hash=( 1 => funca(),
>> 2 => funcb(),
>> );
>
>Try this:
>
> %hash = (1 => \&funca(),
> 2 => \&funcb());
No; \&foo is a reference to the foo function, but \&foo() is a reference
to the re
On Tue, 04 Nov 2003 13:58:41 -0500, mgoland wrote:
> %hash=( 1 => funca(),
> 2 => funcb(),
> );
Try this:
%hash = (1 => \&funca(),
2 => \&funcb());
--
Tore Aursand <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [E
" statement.
You CAN prototype a subroutine to check variable types that are passed
to a sub, but that's a different story.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: ref's to s
Mark wrote:
>
> I am trying to create a hash where each key is a referance to
> subs. The bellow code produces the expected result, with one
> unexpected side-effect. Why are the subs executed when I only
> declare them ??
>
> <- cut
> #!/usr/local/bin/perl -w
>
>
> %hash=( 1 => funca(),
>
On Tuesday, November 4, 2003, at 12:58 PM, [EMAIL PROTECTED] wrote:
Hello Perler's
I am trying to create a hash where each key is a referance to subs.
The bellow code produces the expected result, with one unexpected
side-effect. Why are the subs executed when I only declare them ??
<- cut
#!
Hello Perler's
I am trying to create a hash where each key is a referance to subs. The bellow code
produces the expected result, with one unexpected side-effect. Why are the subs
executed when I only declare them ??
<- cut
#!/usr/local/bin/perl -w
%hash=( 1 => funca(),
2 => funcb(),