#!/usr/bin/perl /usr/bin/asp-perl <% ; my $file1 = '.'; my $file2 = '/'; my $html = ""; my $url = "cgi data =%&"; my @cmds = ( '$Server->MapPath("'.$file1.'")', '$Server->MapPath("'.$file2.'")', '$Server->HTMLEncode("'.$html.'")', '$Server->URLEncode("'.$url.'")', '$Server->Config("GlobalPackage")', ); ($^O eq 'MSWin32') && push(@cmds, '$Server->CreateObject("MSWC.AdRotator")'); %> <% for my $cmd (@cmds) { %> <% } %>
The $Server methods in action

<%= $Server->HTMLEncode($cmd) %>
<%= eval "$cmd" %>