Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: print source golf

by davido (Cardinal)
on Oct 15, 2019 at 15:43 UTC ( #11107489=note: print w/replies, xml ) Need Help??


in reply to print source golf

Is it cheating to use the shell?

#!/usr/bin/perl exec"cat $0"

If you're ok with letting the output happen on STDERR instead of STDOUT:

#!/usr/bin/perl die`cat $0`

...which shaves off one keystroke.


Dave

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2020-01-18 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?