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