#!/usr/bin/perl -w use strict; use warnings; use CGI qw(:standard); my $image=param('image'); my $format=param('format'); print header("image/$format"); binmode STDOUT; print $image;