]> git.donarmstrong.com Git - lib.git/commitdiff
write quote to stdout
authorDon Armstrong <don@donarmstrong.com>
Thu, 23 Feb 2012 18:18:58 +0000 (18:18 +0000)
committerDon Armstrong <don@donarmstrong.com>
Thu, 23 Feb 2012 18:18:58 +0000 (18:18 +0000)
signature_stuff/pick_a_quote.pl

index 83f319ad6cef1a9ab0b4b6f0cb83450c23384a37..cb1a432d054e3c36f8d8f1cb7d0c8db9906fdd1d 100755 (executable)
@@ -11,7 +11,7 @@ my ($temp_file,$quote_file) = @ARGV;
 $temp_file  ||= User->Home."/lib/signature_stuff/sigtemplate.txt";
 $quote_file ||= User->Home."/lib/signature_stuff/quote.txt";
 
-my $sigfile      = new IO::File User->Home."/.signature", 'w' or die "Unable to open ~/.signature for writing; $!";
+my $sigfile      = new IO::File User->Home."/.signature", 'w' or die "Unable to open ~/.signature for writing; $!";
 my $templatefile = new IO::File $temp_file, 'r' or die "Unable to open $temp_file $!";
 
 local $/;
@@ -41,6 +41,4 @@ else {
 
 $template =~ s/\[\%\s*quote\s*\%\]/$quote/;
 
-print {$sigfile} $template;
-
-undef $sigfile;
+print $template;