in reply to Writing to a file

use strict; use warnings;
$filename is being created in an inner lexical scope. Create it in the same scope as the open.

Always test the result of the open, something like this:
open FH,'>',"$filename.xml" or die "Unable to open $filename.xml: $!";

Replies are listed 'Best First'.
Re^2: Writing to a file
by Anonymous Monk on Aug 13, 2009 at 11:56 UTC
    The files are not been created. How to open a file as the filename for the value inside {FILE}. When it finds another {FILE} the previous file name should be closed and another file for the {FILE} should be opened. Please tell me how to do it
      Please tell us the name of the format?