#!/usr/bin/perl -w $| = 1; use strict; use warnings; print "Content-Type: text/html\n\nHallo!

"; my @error; local $SIG{__WARN__} = sub { push @error,shift; }; print "Vorher: @error
\n"; require 'test2.pl'; &fehlersub ('foo'); print "Nachher: @error
\n";