Neon Rocket

Even Neo is Impressed

RSS 2.0

August, 2012


Wicked Cool FizzBuzz in Perl

Stack_Overflow_website_logo

The FizzBuzz problem is a simple coding demonstration to write an application in any language that counts from 1 to 100: Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and …Continue reading →

Bulk fix a list of words to the proper case

Problem Given a long list of upper-case words (one word per line), such as: MARY JOE SCOTT FRED … (for thousands of rows) … You want to change this to Mary Joe Scott Fred (etc) Solution Use perl from the command line. Assume all your names are in a file called ‘names.txt’. We’re going to send the output to a …Continue reading →