Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Writing to a file

by cdarke (Prior)
on Aug 13, 2009 at 11:47 UTC ( [id://788245]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://788245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2026-04-15 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.