#!/usr/bin/perl
#Program name: example6.pl
# arithmetic computation
$num1  = 10;
$num2 = 50;
$num3 = 13;
$average = ($num1 + $num2 + $num3) / 3;
print ("The average is $average\n");

# octal integer representation
$octnum = 0124; # octal literal is specified with a leading zero
print ("Octal 124 value is $octnum\n");

# hexadecimal integer representation
$hexnum = 0x1A; # hex value is specified with 0x prefix
print ("Hexadecimal 1A value is $hexnum\n");
