Dear all,
I would like to separate my input text DB-file into single files each containing the information between the two separators "//"


e.g.

dog, cat, home
home, dog, cat
//
pen, pencil, work
//
milk, water, wine
wine, milk, water
//end

I have tried with this:

do {
    $/="//\n";
    $record= <DBFILE>;
    print $record;
    }    until ($/="//end");


but it prints only:

dog, cat, home
home, dog, cat
//

How can I print in separate files the other records?

Many thanks for this help

Cinzia


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to