Your job at HappyCartoonFriendFinder.com has taken a turn for the worse. All of the venture capital has dried out, subscriptions are down, and the pop-up ad revenue isn't paying the bills anymore. In order to keep the lights on for one more month, your boss decides to make a testimonial page, where toons can present their happy stories of new-found love, all thanks to HappyCartoonFriendFinder.com.After querying the database, you find you've got just 5 paying couples who met through HappyCartoonFriendFinder.com, and you've already stored their names in a hash :
%couples = ( Fred=>"Wilma", Barney=>"Betty", George=>"Jane", Homer=>"Marge", Peter=>"Lois" );
Unfortunately, your company is so low on funding, that they can't pay for more than 80 characters of coding. Not only that, somebody's stolen your remaining supply of newlines, slashes, backslashes and semi-colons, and grabbed all but 2 doublequotes!
Your goal is to produce a small alphabetically listed snippet of text which will be passed onto an p2b end-to-end hyper-business server for use in a larger HTML file, which should hopefully attract new subscribers.
this file should look like :
Barney is married to Betty
Fred is married to Wilma
George is married to Jane
... and so on, for each of the couples.
print out the couple's information as formatted above to STDOUT. Do it in one line of code, using no more than 80 characters. You have only 2 '"' (doublequotes), and you can't use the characters ';', '\' or '/'.
You can assume a shebang line properly formatted for your system,a newline, the %couples hash as specified
above, and one final newline. This means that your solution should be 9 lines long.
Can you save HappyCartoonFriendFinder.com?
This is a relatively easy challenge, suitable for those who are starting to get comfortable with perl. If you say "that's easy!" or have written one or more books on perl, consider skipping this node :)
The reference answer
the 2 entries below are close, but using "\n" disqualifies them. What options in perl could take the place of a newline? (or is this a trick?)
An annoyed saint notes : "in your perl puzzle you should note that people *can* adjust command-line options.. we've been resorting to slurping `cat $0` and doing substitutions to get it to work" and 'maybe say "You can assume a shebang line of your choice, ...'