some-usable-scripts/perl/essai3.perl

25 lines
437 B
Perl
Executable File
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

#!/usr/bin/perl
# Exercices tableaux
@alphabet = ("a" .. "z");
@cartes = ("01".."10","valet","dame","roi");
@annee=("a1","a2","lp");
@promo=@annee;
@tout = (@alphabet , "dut" , @cartes , 1145, "\n");
print @tout;
# Autre exercice
@jours=("Lundi","Mardi","Mercredi");
foreach $jours(@jours)
{
print $jours."\n";
}
# Perl : les nombres : < > <= >= == !=
# Chaînes : lt gt eq ne
# !~ et =~ sont des opérateurs d'appartenance