#!/usr/bin/perl use strict; use warnings; print("Content-Type: application/x-octect-stream\n"); print("\n"); use IO::File (); my $data = IO::File->new('< file') or die("Can't open data file: $!$/"); binmode($data); my $block = ''; while ($data->read($block, 1024)) { print $block; }