#!/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) or die $!; my @lines = ; close (F); chop( @lines ); my $lines = "@lines"; #Hauptroutine my $s = "[Dd]u"; @lines = split ( /$s/, $lines ); @_ = ($s, @lines); &suchstring(@_[0], @_[1]); &schleife; #Subroutinen sub suchstring {} sub schleife { 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;