#!/usr/bin/perl -w use strict; use Getopt::Std; our ($opt_f); getopts('f:'); if($opt_f){ open( FILE, "<:encoding(cp1252)", $opt_f); binmode STDOUT, ":utf8"; while (my $line = ) { chomp ($line); print "$line\n"; if ($line=~ /Number\s+of\s+Observations\s+Used\s+(\d+)/ or $line=~ /(État)/){ print "$1\n"; } } }