Hi folks,

an new question about the mystery of regexs:

I want to store some parts of a file wich are separetet by "#". Each each
part should become an entry of an array. example:

"
# foobar
nothing important
nothing interesting
# bar foot
lululul
lalala
lalala
# foobar2
Rumba-Samba-Tango
"

(okay it stop before the example becomes to silly :) )

$array[0] should contain:
"
# foobar
nothing important
nothing interesting
"

Well, my code looks like this:

open(INPUT,$input_file);
    while (<INPUT>) {
        if (/#/ .. /\n#/) {
        push @array, $_;
        }
    }

But now every line is stored with an own index. I can't use brackets to
get the group of lines in $1. Then I get an error message.

Any hint?

Konrad

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

Reply via email to