On Fri, Feb 15, 2002 at 12:06:22PM -0500, zentara wrote:
> Is it possible to have multiple __DATA__ entries in a program.

No.


> I can seem to find a way to end __DATA__, and @array is getting
> everything.  How to I end __DATA__?

__DATA__ ends at EOF.


The only alternative I can think of at the moment, short of using multiple
files, is to place a marker in the text for where @array should stop and
@array1 should begin.

For example:

    #!/usr/bin/perl -w

    use strict;

    my(@array, @array1);
    while (my $line = <DATA>) {
        last if $line eq "EOD\n";
        push(@array, $line);
    }

    @array1 = <DATA>

    __DATA__
    stuff
    more stuff
    EOD
    stuff
    more stuff


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to