in reply to Data files included in a package
hola;
i have always found
__DATA__
to be useful for including data within scripts/modules;
simple scenario:
you want to use 'test' data if a file is not specified.
...wufnik
i have always found
__DATA__
to be useful for including data within scripts/modules;
simple scenario:
you want to use 'test' data if a file is not specified.
hope that helps,my @lines # where we want to store the data my $testfile = shift; # populate lines in dull bit here if testfile is a file chomp (@lines = (<DATA>)) unless -f $testfile; print join " * ", @lines; __DATA__ in the world of the mules there are no rules
...wufnik
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Data files included in a package
by Zaxo (Archbishop) on Aug 29, 2003 at 06:43 UTC |
In Section
Seekers of Perl Wisdom