#!/usr/bin/perl;

# Programme de recherche d'un motif :

open(FILE1,"$ARGV[0]"); # ouvre moi un fichier qui s'appelerait ARGV[0]
open(FILE2,">$ARGV[1]"); # ouvre moi un fichier en écriture qui s'appelerait ARGV[1]

$motif1="<[^<>]+>" ;
$motif2="Ligne.+[0-9][0-9]" ;

while ($ligne=<FILE1>) { # tant qu'il y a une ligne dans FILE1
	while ($ligne=~/$motif1/) {
		$ligne=~s/$motif1// ;
		} # sinon rien ne se passe
	if ($ligne=~/$motif2/) { # si la ligne contient le motif recherché
		$ligne=~s/$motif2// ;
		} # sinon rien ne se passe
	print FILE2 "$ligne\n"; # je l'écris dans FILE2
	}

close(FILE1);
close(FILE2);
exit;
