sgregoratto.me

source files for www.sgregoratto.me
git clone git://git.sgregoratto.me/sgregoratto.me
Log | Files | Refs

commit 6146c14785279d06cb86eacd4facab911bb43e24
parent 4f4eb4d3e32dfb8b2520250be99584db21f0cc13
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Sun,  8 Sep 2019 23:58:17 +1000

new: join all arguments into one string

Diffstat:
Mnew | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/new b/new @@ -15,13 +15,13 @@ my $fmtTime = "%B %e, %Y"; my $postFile; my $xml; -if (not defined $ARGV[0]) { - die "usage: new \"name\"\n"; +if (! @ARGV) { + die "usage: new title\n"; } -$title = titlecase $ARGV[0]; +$title = $fname = join(" ", @ARGV); +$title = titlecase($title); -$fname = $ARGV[0]; $fname =~ tr/A-Za-z0-9/-/cs; $fname =~ tr/A-Z/a-z/; $fname .= ".xml";