Wednesday, March 12, 2008

Sony Ericsson FTW

YES! I got my Sony Ericsson K660 finally last Friday. The phone is shipped from Hong Kong and I got the phone within 2 days. I also went to Death Valley during the weekend to appreciate the wonder of mother nature and also live the weekend without any internet connection. (believe me, it's not easy.) Before I headed for Death Valley, many people asked me what is there to see in Death Valley? Isn't it just desert? Well, visiting the nation's largest national park, I would say yes, it is desert. However, desert has its own "spectacularity" as well.

Recently, I had to write a couple of short scripts in Perl having to do with single letter option. While doing doing some quick research, I found that there is a module that would make single letter option like cake... wait.. moar liek c0k3! It is called Getopt::Std. This module provides two subroutines getopt and getopts (to me, you can just one of the two.. they are pretty much the same.) This is how you use it:

for example, you are writing a program that takes in the 2 options: -v for verbose and -u for update. e.g. ./krazyScript.pl -uv. All you have to do is following.

getopt('vu'); #yes this is it.

This subroutine will create set $opt_v and $opt_u both to value 1 if the letter is specified. There are actually other usages for the getopt() and you can read more from here.

Speaking of which (I am not sure what this which refers to), after watching several Japanese drama a while ago, I decide to select this cute Japanese actress as my girl of the day. Her name is Maki Horikita. She played the role of main female character in many well known drama such as "Nobuta wo produce" (wild boar makeover would be like the Japanese translation) and "Kurosaki." (black crow). Both shows are wonderful, especially Nobuta! Definitely worth watching.

2 comments:

OtakuPinoy said...
This comment has been removed by the author.
OtakuPinoy said...

You're old friend.