Problems Processing Personalized Perl Presents

The original directions were so simple they were not written down. Save the code in a text file and run it with Perl.

$ perl birthday.pl
Happy Birthday JAPH!!

This no longer works with modern Perl (>5.16).

$ perl birthday.pl
Eval-group not allowed at runtime, use re 'eval' in regex m/(?{print 'Happy Birthday JAPH!!',$/})/ at birthday.pl line 1.

You can see the print line in there. It would have printed everything between the quotes. If you want it to run properly you need to add a command line argument to Perl like this:

$ perl -Mre=eval birthday.pl
Happy Birthday JAPH!!

Facebook is now adding spaces where it splits the message with a newline. There should not be any spaces in the file when you save it and everything should be on one line. Remove any spaces if you are getting a garbled message.