Last active
August 29, 2015 14:14
-
-
Save paveljurca/19a1e008250018b98b5c to your computer and use it in GitHub Desktop.
have a Perl diary!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use autodie; | |
my $note = \&diary; | |
sub diary { | |
my %tasks; | |
chomp(my($date,$task) = @_); | |
$tasks{$date} = $task; | |
### add FILEHANDLE, have a file! | |
#open(my $fh, '>>', q|diary.txt|); | |
#select $fh;$|=1; #flush buffer | |
#print $fh "debug"; | |
### | |
print "$_: $tasks{$_}\n" | |
for (sort keys %tasks); | |
} | |
"1/28/2015"->$note("make a gist"); | |
"1/29/2015"->$note("talk to somebody real"); | |
#<STDIN>->$note(scalar <STDIN>); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment