算術演算子(2)

1 | 2 | 3 | 4 | 5 | 6
第2章 スカラー変数の2-3.スカラー演算子の例題を試してみる。

算術演算子

#!/usr/bin/perl
$a=1;
$b=2;
print $a+$b;

この内容をab.plにする。
ターミナルから操作する。

komadas-Computer:~ komada$ chmod +x ab.pl
komadas-Computer:~ komada$ ./ab.pl
3komadas-Computer:~ komada$

3と答えが出た。