-------------------------------------------------------------------------------
●[代入]

スカラー変数

$name1 = "John"; $name2 = "Paul"; $name3 = "George"; $name4 = "Ringo";

配列変数

@members = ("John","Paul","George","Ringo");

連想配列(ハッシュ)

%gakki = ("guitar1","John","bass","Paul","guitar2","George","drum","Ringo");

------------------------------------------------------------------------------


●[出力]

スカラー変数

$name1
John


$name2
Paul


$name3
George


$name4
Ringo


配列変数

$members[0] $members[1] $members[2] $members[3]
John Paul George Ringo



連想配列(ハッシュ)

$gakki{"guitar1"} $gakki{"bass"} $gakki{"guitar2"} $gakki{"drum"}
John Paul George Ringo