2011-01-04 02:58:26 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
my $age = 30;
|
|
|
|
|
|
|
|
print "Hello $age year old.\n";
|
|
|
|
|
2011-01-04 03:03:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
my $x = 10;
|
|
|
|
my $y = $x + 1;
|
|
|
|
|
|
|
|
print "Using a number $x + 1 = $y.\n";
|
|
|
|
|
|
|
|
$x = "10";
|
|
|
|
$y = $x + 1;
|
|
|
|
|
|
|
|
print "Using a string $x + 1 = $y.\n";
|
|
|
|
|
|
|
|
$x = "ten";
|
|
|
|
$y = $x + 1;
|
|
|
|
|
|
|
|
print "Using an English word, $x + 1 = $y.\n";
|
|
|
|
|
|
|
|
$x = "2ten";
|
|
|
|
$y = $x + 1;
|
|
|
|
|
|
|
|
print "Using a funny string, $x + 1 = $y.\n";
|
|
|
|
|
|
|
|
|
2011-01-04 02:58:26 +00:00
|
|
|
1;
|