summaryrefslogtreecommitdiff
path: root/savefc.pl
diff options
context:
space:
mode:
authorGuillermo Ramos2020-02-27 16:13:39 +0100
committerGuillermo Ramos2020-02-27 16:13:39 +0100
commit2b6c745ad845cfd9ca54fea915f0e19dc3a2c308 (patch)
tree6170cd1a1cb1e3047b61f34724ced08186969067 /savefc.pl
downloadbots-2b6c745ad845cfd9ca54fea915f0e19dc3a2c308.tar.gz
Initial commit
Diffstat (limited to 'savefc.pl')
-rwxr-xr-xsavefc.pl17
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";
+}