Difference between revisions of "Exercise 5.1"

From Earlham CS Department
Jump to navigation Jump to search
Line 1: Line 1:
 
Return to [[Week 2]]
 
Return to [[Week 2]]
 +
Exercise 5.1 in <i>Beginning Perl for Bioinformatics</i></b>
  
<b>Exercise 5.1 in <i>Beginning Perl for Bioinformatics</i></b>
 
<br><br>
 
 
<code>#!/usr/bin/perl -w
 
<code>#!/usr/bin/perl -w
 
use strict;</nowiki>
 
use strict;</nowiki>
#Erika Phelps
+
# Erika Phelps
#Sept. 21, 2009
+
# Sept. 21, 2009
#Exercise 5.1
+
# Exercise 5.1
  
#Write a nonhalting program.
+
# Write a nonhalting program.
  
#Define variables
+
# Define variables
 
my $var = 'DNA is COOL';
 
my $var = 'DNA is COOL';
 
my $constant = '1';
 
my $constant = '1';
  
#Create the while loop to be neverending...
+
# Create the while loop to be neverending...
 
     while($constant = '1'){
 
     while($constant = '1'){
 
         print "$var!\n";
 
         print "$var!\n";
Line 21: Line 20:
  
 
exit;
 
exit;
 +
</code>

Revision as of 15:25, 22 September 2009

Return to Week 2 Exercise 5.1 in Beginning Perl for Bioinformatics

#!/usr/bin/perl -w use strict;</nowiki>

  1. Erika Phelps
  2. Sept. 21, 2009
  3. Exercise 5.1
  1. Write a nonhalting program.
  1. Define variables

my $var = 'DNA is COOL'; my $constant = '1';

  1. Create the while loop to be neverending...
   while($constant = '1'){
       print "$var!\n";

}

exit;