#!/usr/bin/env perl use Mojolicious::Lite; get '/' => sub { my $c = shift; my $output = qx{echo "hello there from the shell"}; $c->render(template => 'index', text => $output); }; app->start; __DATA__ @@ index.html.ep % layout 'default'; % title 'Welcome';
<$= text >
@@ layouts/default.html.ep