#!/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';

Welcome to the Mojolicious real-time web framework!

<$= text >

@@ layouts/default.html.ep <%= title %> <%= content %>