Difference between revisions of "Exercise 4.2"
Jump to navigation
Jump to search
(New page: Return to Week 1 '''Exercise 4.2 in <i>Beginning Perl for Bioinformatics</i>''' <nowiki>#!/usr/bin/perl -w use strict;</nowiki> <nowiki> #Erika Phelps #Sept 20, 2009 #Exercise 4.2</n...) |
|||
Line 3: | Line 3: | ||
'''Exercise 4.2 in <i>Beginning Perl for Bioinformatics</i>''' | '''Exercise 4.2 in <i>Beginning Perl for Bioinformatics</i>''' | ||
− | < | + | <pre>#!/usr/bin/perl -w |
− | use strict; | + | use strict; |
− | + | ||
#Erika Phelps | #Erika Phelps | ||
#Sept 20, 2009 | #Sept 20, 2009 | ||
− | #Exercise 4.2 | + | #Exercise 4.2 |
− | + | ||
#Write a program that stores an integer in a variable and prints it out.</nowiki> | #Write a program that stores an integer in a variable and prints it out.</nowiki> | ||
− | + | ||
#Storing the integer | #Storing the integer | ||
− | my $variable = '4'; | + | my $variable = '4'; |
− | <nowiki>#Printing it out | + | <nowiki>#Printing it out |
print "The variable is $variable.\n"; | print "The variable is $variable.\n"; | ||
− | exit; | + | exit;</pre> |
Latest revision as of 13:00, 23 September 2009
Return to Week 1
Exercise 4.2 in Beginning Perl for Bioinformatics
#!/usr/bin/perl -w use strict; #Erika Phelps #Sept 20, 2009 #Exercise 4.2 #Write a program that stores an integer in a variable and prints it out.</nowiki> #Storing the integer my $variable = '4'; <nowiki>#Printing it out print "The variable is $variable.\n"; exit;