diff options
author | Guillermo Ramos | 2020-02-27 16:13:39 +0100 |
---|---|---|
committer | Guillermo Ramos | 2020-02-27 16:13:39 +0100 |
commit | 2b6c745ad845cfd9ca54fea915f0e19dc3a2c308 (patch) | |
tree | 6170cd1a1cb1e3047b61f34724ced08186969067 /savefc.pl | |
download | bots-2b6c745ad845cfd9ca54fea915f0e19dc3a2c308.tar.gz |
Initial commit
Diffstat (limited to 'savefc.pl')
-rwxr-xr-x | savefc.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/savefc.pl b/savefc.pl new file mode 100755 index 0000000..2333ab9 --- /dev/null +++ b/savefc.pl @@ -0,0 +1,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"; +} |