Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: (Golf) Friday Golf: Print Formatted Sequence of Digits

by jsprat (Curate)
on Aug 15, 2003 at 01:12 UTC ( #284063=note: print w/replies, xml ) Need Help??


in reply to (Golf) Friday Golf: Print Formatted Sequence of Digits

23 (24 with the -l), and doesn't print the trailing space!

$perl -le'$,=$";print"002".."020"' 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 01 +9 020 $perl -e'print length q/$,=$";print"002".."020"/' 23
Update: I guess I was beaten to the punch. sauoq's is an update, and it wasn't there when I began writing this post (I searched the page for $" before I started writing my post).

Replies are listed 'Best First'.
Re^2: (Golf) Friday Golf: Print Formatted Sequence of Digits
by Aristotle (Chancellor) on Aug 15, 2003 at 01:58 UTC
    That's exactly what sauoq already posted a while ago.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-06-02 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (19 votes). Check out past polls.

    Notices?