So my wife and I are expecting our first baby. Today in fact, although it looks as though she will be a bit late.
I got tired of trying to figure out which button did what on the little digital watch we were trying to use to time contractions, so I threw this together. There is obviously room for improvement (or even golfing), but something tells me that I should be doing something else right about now...
#!/usr/bin/perl -w use strict; use warnings; my $last = time; while( <> ) { my $time = time; my $interval = $time - $last; print localtime($time)." ($interval)"; $last = $time; }
| We're not surrounded, we're in a target-rich environment! |
|---|
In reply to Giving birth with perl by jasonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |