I have the CPAN Modules Inline::Files and Inline::Awk, and am using Strawberry Perl 5.18.1001.
I copied the simplest of the sample programs from the Inline::Awk page and attempted to run it:
#!C:\strawberry\perl\bin\perl.exe
use strict;
use warnings;
use Inline:: Files;
use Inline::AWK;
awk();
__END__
__AWK__
BEGIN { print "Hello, world!" }
++++++++++++++++++++++++++++++++++++++++++++++++++
However I get the error message:
Undefined subroutine &main::awk called at test_awk.pl
+++++++++++++++++++++++++++++++++++++++++++++++++
I looked for "Undefined subroutine" threads in Perl Monks and tried some of the alternate syntax suggestions, however I get the same error after trying each of these:
a) Change "awk" function call line to -- Inline::AWK::awk();
b) Change "use" line to -- use Inline::AWK qw(awk);
++++++++++++++++++++++++++++++++++++++++++++++++++
The strawberry folder holding the Awk.pm file is:
C:\strawberry\perl\site\lib\Inline
Is it possible that Inline::Awk works with regular Perl, but Inline::Awk fails when using Strawberry Perl?
++++++++++++++++++++++++++++++++++++++++++++++++++
My version of Strawberry Perl (5.18.1001) has a2p.pod but lacks a2p.exe.
When I removed "use strict" and "use warnings", and used "use Inline AWK;", I get the error message:
" 'a2p' is not recognized as an internal or external command, operable program or batch file."
(Removal of "use strict" is necessary, otherwise when including "use Inline AWK;" AWK is called a "bareword" and the program fails.)
Is it the case that the only remedy is to find some later version of Strawberry Perl that re-introduces a2p.exe? I can find no CPAN module that might be used to re-introduce a2p.
The Inline AWK CPAN module assumes that a2p is available.