-- def_macro note my $file = shift or die "Please indicate the note you wish to create/append to"; mkdir 'notes' unless -e 'notes'; open my $fh, ">>", "notes/$file" or die "Couldn't open note for write: $!"; local $/; print $fh $_ while <>; close $fh or die "Trouble closing file: $!"; print "Successfully appended to note $file";