$nombre = 1; $nombre = $nombre + 10; $chaine = "nombre : "; $chaine = $chaine.$nombre; chop($chaine); print $chaine $nombre= 12; $chaine = ($nombre+1)." ".($nombre+2); @tab = ($nombre, ($chaine,$chaine)); print $tab[1]; %hash = ("id1" => 1, "id2" => "chaine"); $id = "id"; $hash{$id} = "je ne sais pas"; @tab = each(%hash); @tab = each(%hash); print $tab[1]; $c1 = "chaine"; $t = $c1 eq "chaine2"; if ( $t ){ print "1"; }elsif ( 1 < 10 & 2 > 3 ){ print "2"; }elsif ( 2 | "0" ){ print "3"; }else{ print "4"; } @liste = ("2","22", "10", "100") foreach $_ (@liste) { print $_; if ( $_ lt "20"){ $_ = $_ + 1; } print " ".$_; print "\n"; } my $v = '"cette" chaine'; if( $v =~ m/^"([a-z]{4,})",/ ) { print "$1\n"; } my $v = '"celle",ci'; if( $v =~ m/^"([a-z]{4,})",/ ) { print "$1\n"; } my $v = 'et "celle",la'; if( $v =~ m/^"([a-z]{4,})",/ ) { print "$1\n"; } my $v = '"ou",elle'; if( $v =~ m/^"([a-z]{4,})",/ ) { print "$1\n"; } my $a = 3; sub fonction{ my ($a) = @_; return ($a+2,$a+1); } my ($b,$a) = fonction($a+2);