Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Printing to a file problem

by ehdonhon (Curate)
on Aug 22, 2002 at 15:56 UTC ( [id://192062]=note: print w/replies, xml ) Need Help??


in reply to Printing to a file problem

try some error checking to make sure everything is doing what you think:
open (OUT_FILE,">$OUTPUT_PATH/$SUB_DIR/$NEW_FILE") or die ( $! );

Replies are listed 'Best First'.
Re: Re: Printing to a file problem
by Dartanion (Initiate) on Aug 22, 2002 at 15:59 UTC
    I know the file is opened also because i pting something to it afterwards and it is there.
    open (STATIC_HEADER, "<\./static_header.ps") ; open (OUT_FILE, ">$OUTPUT_PATH/$SUB_DIR/$NEW_FILE") ; @TMP_HEADER = <STATIC_HEADER> ; print @TMP_HEADER ; print OUT_FILE @TMP_HEADER ; print OUT_FILE "%%Page:" ;
    The page data is there but the static stuff is not
      Ok, then are you sure you are opening the STATIC_HEADER file like expected? I would put an  or die... in both of the opens to make sure. If it does not open @TMP_HEADER is empty and the print OUT_FILE @TMP_HEADER; does nothing.

      -Waswas

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-19 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found