#!/usr/local/bin/perl # # use strict; use warnings; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); print "Content-type: text/plain\n\n"; my $text = '/SAN/content/cgi-bin/text'; my ($out, $tmp); open (F, "<", $text); my @lines = ; close (F); chop( @lines ); my $lines = "@lines"; #Hauptroutine &suchstring; &for; #Subroutinen sub suchstring { my $s = "[Dd]u"; @lines = split ( /$s/, $lines ); } sub for { for ( my $i = 0; $i < $#lines; $i++ ) { $out = substr( $lines[$i], length($lines[$i]) - 20, 20 ); $out .= "du"; $out .= substr( $lines[$i + 1], 0, 20 ); print $out."\n"; } } exit 0;