use POSIX; while () { $_ =~ s//(?{ \&datum })/g; } sub datum { my $jetzt = strftime ("%a %b %e %H:%M:%S%Y", gmtime); return $jetzt; }