Add simple scripts used in interviews

This commit is contained in:
Tracey Clark 2024-06-08 15:49:48 -05:00
commit d1a39bf85d
2 changed files with 65 additions and 0 deletions

20
interview_scripts/fizzbuzz.pl Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env perl
use strict;
use warnings;
#Fizz buzz example
# For 1 .. 10 if odd print fizz, otherwise print buzz
for my $num (1..10) {
# print "$num: "; # Debug
if ($num % 2) {
print "fizz\n";
}
else {
print "buzz\n";
}
}