From 71d0f097da4f35823116c1a89f0c55d2c5adbc74 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 25 Jun 2019 14:50:45 +0200 Subject: Trim tgsend input --- tgsend | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tgsend') diff --git a/tgsend b/tgsend index 9a77feb..6bacc2e 100755 --- a/tgsend +++ b/tgsend @@ -40,7 +40,8 @@ $TOKEN ||= fetch_token() or # Read text from stdin undef $/; -my $text = ; +my $text = join "", ; +$text =~ s/^\s+|\s+$//g; # Trim input # Send message to chats (or pretend to) if ($PRETEND) { -- cgit v1.2.3