Darren Ferguon - Weblog

Perl - Passing a parameter

Sample of passing a parameter from Umbraco to Perl.

Marco Tag

<?PERL_MACRO id="text" value="<?UMBRACO_GETITEM field="Title"/>"></?PERL_MACRO>

Marco Output

PERL FOR UMBRACO: The remote server returned an error: (404) Not Found. requesting http://www.darren-ferguson.com:80/plex/text.plex

Perl Source

use strict;
use utf8;
use CGI;
use Date::Format;

my $query = new CGI;
print $query->header(-charset => 'utf-8');
my $value = $query->param('value');
if($value) {
	print $value;
} else {
	print 'no value specified';
}