#!/usr/bin/perl use strict; print "Content-type: text/plain\n\n"; print "Test\n\n"; sub indent { my ($text, $cols) = @_; $cols //= 1000; $text =~ s/^\s{0,$cols}//gm; return $text; } if (1) { print indent(<<"END_TEXT", 1); Here is some test text with plenty of space and an indent here at the start END_TEXT } exit 0;