#Exemple de comportement subtil

use strict;
use warnings;

sub lire ($) { # nom de fichier -> Document
	my ($fich) = @_;
	open(ENTREE, "<utf8", $fich);
#	open(ENTREE, "<$fich");
		
	my @tablignes = <ENTREE>;
	foreach my $ligne ( @tablignes  ){
	
	#lecture
		my ($le_nom, $la_note) = split( /\s+/, $ligne);
		 
	#ecriture
        print("$le_nom -> $la_note\n");
	}
		
}# lire


lire($ARGV[0]);