On Sep 15, 8:38 am, rp.ne...@yahoo.com (Rajeev Prasad) wrote:
> plz. advice why am i getting this error?
>  
>  
> I have checked:
> varilable outfile has proper path/filename
> array allrecords has data
>  
>  
> open(OUT_FH,">","$outfile");
> print OUT_FH "@allrecords";
> close OUT_FH;
>  
>  
> error:
> print() on closed filehandle OUT_FH at /...
>  
>  
> thank you.

Hi Although  I don't know the error msg reason, but you can test the
open func is called success . like this
if (! open(OUT_FH, ">", "$outfile")) {
    die "Can's open file:$!" ;
}


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to