Showing posts from December, 2012

Will we face the Apocalypse on Friday, 2012-12-21?

Based on various prophecies from around the World there supposed to be some sort of major global event happening on Friday, December 21st. Whiles many call for the end of the world – the Apocalypse, others call for the return of Jesus - Messiah. If anything is to happen, these would be my guesses:

How To Split a Phone Number [PERL]

Phone numbers, as we know, are most commonly made of three elements (area code) prefix-number. If your program or a script has to process phone numbers some times it is useful to separate the three elements and store them in separate variables. Below I will show you how you can achieve this in Perl using the build-in substr function.

The substr function will extract a string of characters, with predefined length and starting at specific position, from a scalar string passed to it. First argument we provide is the data string; the second is the starting character number (starting the count at zero); the third is the length of the substring you would like returned.