Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: print source golf

by daxim (Curate)
on Oct 14, 2019 at 17:24 UTC ( [id://11107439]=note: print w/replies, xml ) Need Help??


in reply to print source golf

print do{@ARGV=$0;*/;<>}; # wtf
*/ is the glob for the family of variables named /, short for *main::/.

Perl core uses $/. Regexp::Grammars uses %/.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2025-03-27 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (70 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.