This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#~/usr/bin/perl -w | |
use strict; | |
use warnings; | |
my $count; | |
for ($count = 1; $count <= 100; $count++) { | |
if ($count % 15 == 0) { | |
print "FizzBuzz\n";} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $DNA1 = 'AAATTTTGGGGCCCCaaaaatttttcccccggggg'; | |
my $rev = reverse($DNA1); | |
my $DNA2 = $DNA1; | |
$DNA2 =~ tr /atcgATCG/tagcTAGC/; | |
print "$rev\n"; | |
exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -sw | |
my $DNAfilename = 'exampleSequence.txt'; | |
open(DNAfile, $DNAfilename); | |
my $DNA = <DNAfile>; | |
close DNAfile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
print "Which sequence would you like to view?\n\n"; | |
my $DNAfilename = <>; | |
open(DNAfile, $DNAfilename); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
print "Which file would you like to use?\n"; | |
my $DNAfilename = <>; | |
open(DNAfile, $DNAfilename); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!user/bin/perl | |
use strict; | |
use warnings; | |
my $password = 'poops!'; | |
print "Please enter your guess:\n"; | |
my $guess = <STDIN>; | |
chomp $guess; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $DNAfilename = 'exampleSequence.txt'; | |
unless (open(DNAFILE, $DNAfilename)) { | |
print "Could not open file $DNAfilename\n\n"; | |
exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
open FILE, 'practice.txt'; | |
my @content = <FILE>; | |
print "raw content:\n @content\n\n"; | |
my $line; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
#use warnings; | |
require "getopts.pl"; | |
use vars qw ($opt_f $opt_s $opt_h $opt_H); | |
&Getopts('f:s:hH:'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
#use warnings; | |
require "getopts.pl"; | |
use vars qw ($opt_f $opt_s $opt_h $opt_H); | |
&Getopts('f:s:hH:'); |
OlderNewer