1.chapter2.1.pl
#!/usr/bin/perl -w
$d = 0;
$d = 2*3.1415926*12.5;
print "$d\n";
2.chapter2.2.pl
#!/usr/bin/perl -w
chomp($d = <STDIN>);
$d *= 2*3.1415926;
if($d < 0) {
$d = 0;
}
print "$d\n";
3.chapter2.4.pl
#!/usr/bin/perl -w
chomp($mult_a = <STDIN>);
chomp($mult_b = <STDIN>);
$result = $mult_a * $mult_b;
print "$result\n";
4.chapter2.5.pl
#!/usr/bin/perl -w
$string = <STDIN>;
chomp($num = <STDIN>);
print "$string" x $num;