in reply to split question
my @loads_of_stuff; while ( my $line = <DATA> ) { chomp $line; while ( $line =~ m/#input(.+?)#end/g ) { push @loads_of_stuff, $1; } }
This will run into trouble if #input and #end are potentially on different lines in the file. If that's a possibility, you my need the range operator, or to slurp chunksof the file, or even to set the file input record separator to #end.
You will run into additional trouble if #input and #end are legal characters if placed within quotes, ie, #input "this is what you want to capture, including #end" #end
Dave
|
|---|