open(FH,">$data"); print FH "redrush\n"; close(FH); #the script is dependent on the contents of $data #I HAVE to do it this way, i can't just pass a string for reasons that are unrelated to my question. some_command($data); &show_html; sub show_html { print header; #static html }