Friday, December 5, 2008

Perl array to hash

For all of you perlers (meaning: me), here's a cool array-to-hash function:

my %color = map { $_, 1 } @color;

Got that from http://www.artima.com/forums/flat.jsp?forum=166&thread=148392 who evidently jacked it from Effective Perl.

Pretty cool huh?

Tonight we watched "The Mouse That Roared" (See Wikipedia for a synopsis) for my civ class. It was pretty funny. Some interesting things I noticed:
  • The obvious cold war influence

  • The flags all had 48 stars on them. I guess I've never noticed that before. The movie was released in 1959, the same year that Alaska and Hawaii joined the Union.


Yeah. Good times.

No comments: