summaryrefslogtreecommitdiff
path: root/savefc.pl
blob: 2333ab97c8469ebfe5527c87631803f87e641bd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env perl

use strict;
use warnings;

my $phrase = join "", <STDIN>;
chomp $phrase;

if ($phrase) {
    open(my $f, ">>", shift) or die $!;
    print $f "$phrase\n====\n";
    close $f;

    print "Saved!\n";
} else {
    print "I don't like that, GTFO\n";
}