#!/usr/local/bin/perl 

$where_is_perl=`which perl`;

print "Hello, World!\n"; #one has to keep traditions :)
print "On my computer Perl is installed in $where_is_perl\n";

#each statement (or sentence) in Perl language is separated by semicolon ";"
#and comments start with the pound sign #

#variables in Perl are of 3 main types: $calars, @arrays and %hashes. 
#The latter two are described in chapter 3, which is YOUR HOME READING ASSIGNMENT

$string="ATCG";
print "value of \$string is $string\n";
#note that use of backslash in front of dollar sign forced Perl to print variable 
#name instead of variable value

print "Do not mix up backward and forward slash: they have different meaning:\n";
print "1/2/n\n"; #guess what this line prints? 
print 1/2; #and this one?

print "\n\n"; 

#p.22 script has a typo, the last command should have back ticks: ``
$list_me="ls -l";
print "$list_me\n";
print '$list_me';
print "\n";
print `$list_me`;  

#perl data type conversion is automatic. Sometimes it is very scary, sometimes unexpected
#BE VIGILANT!

$gi_number1="15605613";
$gi_number2="15605614";
print $gi_number1+$gi_number2; #Perl easily sums two gi numbers although we had them as strings

#lower and upper case matter
$MY_VAR="hello\n";
print "$my_var"; #does not really print anything if no "-w" switch used, prints warning otherwise 
 
print "\n";

#Homework Assignments:
#read Chapter 3
#exercise 5 / challenge 3 (p24/25)
#another typo: ex. 5 last line should read : $c='$a+$b';

#send your homework to bioinf@carrot.mcb.uconn.edu. This is mandatory if you signed up for credit.
#your grade will be based on your homework participation, as well as class participation

####################################
# GETTING AHEAD: very special variable: array @ARGV
print "Bringing small amounts of data into the program: $ARGV[0]\n";

