Exercise 5.1D

From Earlham CS Department
Revision as of 11:33, 18 December 2009 by Damian (talk | contribs) (New page: Return to Week 2 Exercise 5.1 in <i>Beginning Perl for Bioinformatics</i></b> <pre> #!/usr/bin/perl -w use strict; # Damian Almiron # Ex5-1 # Write a nonhalting program using a...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Return to Week 2 Exercise 5.1 in Beginning Perl for Bioinformatics


#!/usr/bin/perl -w

use strict; 

# Damian Almiron

# Ex5-1 

# Write a nonhalting program using a loop- (refer to pg 61), can you use

#pattern matching for this (refer to pg 69)? 

# Define variables

my $number= ’777’;

my $name= 'DamianDamianDamian'; 

# Infinite loop

    while($number = '777'){

        print "$name!\n";

} 

exit;