User Control Panel
|
|
|
 |
Advertisements
|
 |
|
|
|
HELP US, HELP YOU!
|
| Author |
Message |
dubbeld Newbie

Joined: 23 Jan 2005 Posts: 9
  
|
Posted: Wed Mar 23, 2005 2:44 pm Post subject: |
|
|
I've got the following error:
When I try to execute the following script:
| Code: | | use strict;<br /><br />sub version {<br /> print "something else";<br />}<br /><br />my $something = "version";<br /><br />&{$something}; |
it will go:
| Code: | | Can't use string ("version") as a subroutine ref while "strict refs" in use at test.pl line 9. |
(if I don't use strict it will work... but I want to use it...)
In Juggernaut it works with the following script (and it uses strict)...
| Code: | | $reply = &{$current} ($self,$client,$msg,$listener) || panic ("Bad command form: no reply", 1); |
How can i solve this at my script? |
|
| Back to top |
|
 |
dubbeld Newbie

Joined: 23 Jan 2005 Posts: 9
  
|
Posted: Wed Mar 23, 2005 3:08 pm Post subject: |
|
|
Found it...
| Code: | | __PACKAGE__->can("$something")->(); |
|
|
| Back to top |
|
 |
|
|