You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
514 B

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
use 5.16.0;
# Exercices tableaux
my @alphabet = ("a" .. "z");
my @cartes = ("01".."10","valet","dame","roi");
my @annee=("a1","a2","lp");
my @promo=@annee;
my @tout = (@alphabet , "trucmachin" , @cartes , 1145, "\n");
print @tout;
# Autre exercice
my @jours=("Lundi","Mardi","Mercredi");
# explicite
#foreach $jours(@jours)
#{
# print $jours."\n";
#}
say foreach @jours ;
# Perl : les nombres : < > <= >= == !=
# Chaînes : lt gt eq ne
# !~ et =~ sont des opérateurs d'appartenance