Exercise 5.1: Difference between revisions

From Earlham CS Department
Jump to navigation Jump to search
Erika (talk | contribs)
No edit summary
Erika (talk | contribs)
No edit summary
Line 4: Line 4:
<br><br>
<br><br>
<nowiki>#!/usr/bin/perl -w
<nowiki>#!/usr/bin/perl -w
use strict;</nowiki>
use strict;</nowiki><br>
<nowiki>
<nowiki>
#Erika Phelps
#Erika Phelps
#Sept. 21, 2009
#Sept. 21, 2009
#Exercise 5.1</nowiki>
#Exercise 5.1</nowiki><br>
<nowiki>
<nowiki>
#Write a nonhalting program.
#Write a nonhalting program.
Line 14: Line 14:
#Define variables
#Define variables
my $var = 'DNA is COOL';
my $var = 'DNA is COOL';
my $constant = '1';</nowiki>
my $constant = '1';</nowiki><br>
<nowiki>
<nowiki>
#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";
}</nowiki>
}</nowiki><br>


exit;
exit;

Revision as of 03:43, 22 September 2009

Return to Week 2

Exercise 5.1 in Beginning Perl for Bioinformatics

#!/usr/bin/perl -w use strict;
#Erika Phelps #Sept. 21, 2009 #Exercise 5.1
#Write a nonhalting program. #Define variables my $var = 'DNA is COOL'; my $constant = '1';
#Create the while loop to be neverending... while($constant = '1'){ print "$var!\n"; }

exit;