#!/usr/bin/perl

print "Muster: ";
$pattern=;
chomp $pattern;

print "Ersetzung: ";
$sub=;
chomp $sub;

while (<>)
{

	if ($_ =~ s/$pattern/$sub/ixgo)
	#i: ignore case
	#x: Ignoriere Whitespace, erlaube Kommentare (#)
	#g: Globale ersetzung
	#o: Nur einmal kompilieren
	{
		print "Treffer\n";
		print "<$`>$&<$'";
		print "Neu: $_";
	}
}

Archiviert am 14.02.2026
patent_button.gif valid-html401.png elektra.jpg permaplant.png fsfe-logo.png valid-css.png vim.gif anybrowser.gif