#!/usr/bin/env perl use strict; use warnings; use Plack::Request; sub { my $request = Plack::Request->new(+shift); # If the URI starts with /success, it is one. my $success = $request->path =~ m{\A/success\b}; [ 200, [ "Content-Type" => "text/plain" ], [ $success ? 1 : 0 ] ]; } #### ~>plackup HTTP::Server::PSGI: Accepting connections at http://0:5000/