http://www.perlmonks.org?node_id=468256


in reply to how to open excel in browser using CGI::Application

You could use CGI::Application::Plugin::Stream :
use CGI::Application::Plugin::Stream (qw/stream_file/); sub show_excel{ if ( $self->stream_file( "temp.xls" ) ) { return; } else { return $self->error_mode(); } }