open(FILE,"$file.pdf") || die "Can't open: $!"; print header("application/pdf"); binmode STDOUT; print while ; close(FILE);