Howdy all,
In a script I can access __END__ via DATA
I'd like to access __END__ form within a module (IE package)
Foo.pm
package Foo;
use strict;
use warnings;
sub dofoo {
print DATA;
}
1;
__END__
hello
world
in script:
#!/usr/bin/perl
use strict;
use warnings;
use Foo;
On Jul 13, JupiterHost.Net said:
In a script I can access __END__ via DATA
I'd like to access __END__ form within a module (IE package)
Reading 'perldoc perldata' yields this:
Text after __DATA__ but may be read via the filehandle PACK-
NAME::DATA, where PACKNAME is the package that was
Jeff 'japhy' Pinyan wrote:
On Jul 13, JupiterHost.Net said:
In a script I can access __END__ via DATA
I'd like to access __END__ form within a module (IE package)
Reading 'perldoc perldata' yields this:
Text after __DATA__ but may be read via the filehandle PACK-
NAME::DATA, where