I have the following Perl module:
package module 
sub 开发者_如何学Pythontest1{
  my @data=@_
  print @data;
}
When I call this module from a Perl script using:
my $test='test1';
my $full_name = "Module::" . $test; 
my @data=(1,2,3)
no strict 'refs'; 
$full_name->(@data);
I get no result on stdout but I expected 1,2,3. Could someone explain why?
It sounds like you are not setting up your module properly.
Running the following self contained script produces the correct result:
{package Module;
    sub test1 {print "test1: @_\n"}
}
my $test = 'test1';
my $full_name = 'Module::'.$test;
my @data = (1, 2, 3);
no strict 'refs';
$full_name->(@data);  # test1: 1 2 3
It is hard to tell without seeing exactly what you have, but chances are you have forgotten to include the package Module; line at the top of your module.  The package is not implicitly set via the file name, you must declare it at the top of the file.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论