Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

print source golf

by Anonymous Monk
on Oct 14, 2019 at 16:02 UTC ( #11107426=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    use warnings;
    
    print do{@ARGV=$0;<>};
    
  2. or download this
    print do{local(@ARGV,$/)=$0;<>}; # the usual idiom
    print do{@ARGV=$0;local$/;<>};
    ...
    print do{open$_,"<$0";<$_>};
    print do{@ARGV=$0;*/;<>};        # wtf
    print do{@ARGV=$0;<>};           # wow
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11107426]
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-01-24 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?