Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: golfing one liner

by Laurent_R (Canon)
on Mar 02, 2019 at 10:08 UTC ( [id://1230755]=note: print w/replies, xml ) Need Help??


in reply to golfing one liner

haukex's solutions are probably better (and my first thought when reading your post was to use join in something very similar to haukex's first solution), but you could also use map:
$ perl -E 'say map "$_ ", a..z' a b c d e f g h i j k l m n o p q r s t u v w x y z
Update at 10:30 UTC: I had not seen that you said in the title that you wanted a golfed solution. You can just remove some spaces to improve the character count:
$ perl -E 'say map"$_ ",a..z' a b c d e f g h i j k l m n o p q r s t u v w x y z

Replies are listed 'Best First'.
Re^2: golfing one liner
by Galdor (Sexton) on Mar 02, 2019 at 11:00 UTC
    Excellent - many thanks! Great book btw - I have already seen it...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230755]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-29 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found