file |
11/02/2022 |
extrait le basename d'un fichier
sub nom_sans_ext()
{
my $str=shift;
my @work;
@work=split(/\./,$str);
return @work[0];
}
# remplace l'extension d'un fichier
$nom="fichier.txt";
$nom2=&nom_sans_ext($nom);
$nom="$nom2.md";
print "$nom\n";