Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My path thru this course:#!/usr/bin/perl use strict; use warnings; print do{@ARGV=$0;<>};
print do{local(@ARGV,$/)=$0;<>}; # the usual idiom print do{@ARGV=$0;local$/;<>}; print do{@ARGV=$0;$/='';<>}; # bad print do{open$_,"<$0";<$_>}; print do{@ARGV=$0;*/;<>}; # wtf print do{@ARGV=$0;<>}; # wow
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print source golf
by LanX (Saint) on Oct 14, 2019 at 16:17 UTC | |
|
Re: print source golf
by Corion (Patriarch) on Oct 14, 2019 at 16:21 UTC | |
by tobyink (Canon) on Oct 14, 2019 at 21:10 UTC | |
|
Re: print source golf
by tybalt89 (Monsignor) on Oct 14, 2019 at 16:07 UTC | |
|
Re: print source golf
by daxim (Curate) on Oct 14, 2019 at 17:24 UTC | |
|
Re: print source golf
by davido (Cardinal) on Oct 15, 2019 at 15:43 UTC |