summaryrefslogtreecommitdiffstats
path: root/postfix_wizard/scripts/testlabel.pl
blob: c61d3cb01898c178ba55b8c0c0e5733895e3f575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$toto = "tutu";
$tata = "titi";

$file = "/home/logarno/toto";
open(CANONICAL, "< $file");
while (<CANONICAL>) {
    if (/\@$toto\s*\@$tata/){
	goto NOUPDATE; 
    }
}
close(CANONICAL);
open(CANONICAL, ">> $file");
print CANONICAL "\n\@$toto \@$tata";
 NOUPDATE:
    close(CANONICAL);