Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by jsprat (Curate)
on Aug 15, 2003 at 01:12 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://284063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found