> Interesting. > Try changing the condition to: > > unless ($preamble && $preamble !~ /^\s+$/s); > > so that having only whitespace is not sufficient to prevent adding those > initial lines. Have now done so, and it works. > Thanks for the report. Thanks for the help! Chris