#!/usr/bin/perl -w
#

# This is a local variable that only contains one value, it happens to be a string of text.
my $JustALocalVariable = "Users name goes here";
  
# This is a local array and it contains many variables as strings of text
my @ListOfUsers = ("Kim", "Tom", "Ed", "Mark");
print "User 3 is ".$ListOfUsers[2]."\n";
# That line prints Ed to the command line
   
# This is a local hash variable. It works like an array, it is a stack of variables but you can use a name to access the variable rather then it's position in the list.
$NickNames->{'Kim'} = "Fast taker";
$NickNames->{'Tom'} = "The Doctor";
$NickNames->{'Ed'} = "Mister Giggles";
$NickNames->{'Mark'} = "Boss Man";
print "Mark likes to be called ".$NickNames->{'Mark'}."\n";

@Staff = ("Kim", "Tom", "Danny", "Linda", "Roger");
foreach $Name (@Staff)
{
   print "Say hello to $Name\n";
}

$A = 6;
 
if ( $A > 9 )
{
   # This condition evaluates to FALSE
   print "This line will never happen because A is not greater then 9\n";
}
if ( $A < 7 )
{
   # This condition evaluates to TRUE
   print "Look, A is less then 7\n";
}
if ( $A < 7 )
{
   # This condition evaluates to TRUE
   print "Look, A is less then 7\n";
}
if ( $A == 6 )
{
   print "A is equal to 6\n";
}
if ( $A == "6" )
{
   print "Perl sees \"6\" and 6 as the same when using == to test\n";
}
$Name = "Joe";
if ($Name eq "Tom" ) 
{
   print "Hello Tom\n";
}
if ($Name eq "Joe" ) 
{
   print "Hello Joe, you just missed Tom.\n";
}

