#! /usr/bin/perl use warnings; use strict; use Template; my $template = 'http://something.com/api_stuff/[%GUID%]'; make_call( '1234' ); sub make_call { my $GUID = shift; my $template_object = 'Template'->new; $template_object->process(\$template, {GUID => $GUID}, \ my $output); POST($output); } use Test::More; sub POST { is shift, 'http://something.com/api_stuff/1234', 'intepolates'; } done_testing();