Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: golfing one liner

by haukex (Archbishop)
on Mar 02, 2019 at 09:45 UTC ( [id://1230753]=note: print w/replies, xml ) Need Help??


in reply to golfing one liner

$ perl -E 'say join$",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 $ perl -E 'say"@{[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: Added second version (~1 min after posting :-) )

Replies are listed 'Best First'.
Re^2: golfing one liner
by jwkrahn (Abbot) on Mar 02, 2019 at 22:57 UTC
    $ perl -E '$,=$";say 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
      +An example with local:
      print "from 'a' to 'z':\n"; do { local $, = $"; print a..z };

      Nice.

Re^2: golfing one liner
by Galdor (Sexton) on Mar 02, 2019 at 09:53 UTC
    Bingo! You da man! Prefer first version!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found