sathish_cudd has asked for the wisdom of the Perl Monks concerning the following question:
another .pl script.# test.pl #!/usr/bin/perl use strict; use warnings; print "Hello, World...\n"; my $perl = "a.pl"; $perl->(10,20);
if i ran the test.pl. it gives error as Can't use string ("a.pl") as a subroutine ref while "strict refs" in use at C:\Users\Sathish\Desktop\T\test.pl line 9. Please tell me what the error says. It would be great if i have an explanation. Thanks# add.pl #!/usr/bin/perl use strict; use warnings; print "here\n"; return sub { my ($a , $b) = @_; return 0; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subroutine ref while "strict refs"
by tobyink (Canon) on May 12, 2012 at 12:20 UTC | |
|
Re: subroutine ref while "strict refs"
by ww (Archbishop) on May 12, 2012 at 12:41 UTC | |
|
Re: subroutine ref while "strict refs"
by choroba (Cardinal) on May 12, 2012 at 12:07 UTC |