[Boulder.pm] Boulder-pm Digest, Vol 39, Issue 11

Walter Pienciak wpiencia at thunderdome.ieee.org
Thu Aug 23 10:34:22 PDT 2012


I could generalize it as:

#!/usr/bin/perl

open MYSELF, '<', $0;
print while (<MYSELF>);


Walter

On Thu, Aug 23, 2012 at 10:18:17AM -0700, Ed Dow wrote:
> 
> 
> Still a cool solution.....sucks it only works on unix/linux  ;-)
> 
> 
> ________________________________
>  From: "boulder-pm-request at pm.org" <boulder-pm-request at pm.org>
> To: boulder-pm at pm.org 
> Sent: Wednesday, August 22, 2012 1:00 PM
> Subject: Boulder-pm Digest, Vol 39, Issue 11
>  
> Send Boulder-pm mailing list submissions to
>     boulder-pm at pm.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>     http://mail.pm.org/mailman/listinfo/boulder-pm
> or, via email, send a message with subject or body 'help' to
>     boulder-pm-request at pm.org
> 
> You can reach the person managing the list at
>     boulder-pm-owner at pm.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Boulder-pm digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Boulder-pm Digest, Vol 39, Issue 9 (Walter Pienciak)
>    2. Re: Boulder-pm Digest, Vol 39, Issue 9 (Kate)
>    3. Re: Boulder-pm Digest, Vol 39, Issue 9 (Rob Nagler)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 22 Aug 2012 10:05:47 -0600
> From: Walter Pienciak <wpiencia at thunderdome.ieee.org>
> To: Ed Dow <eddow1976 at yahoo.com>, boulder-pm at pm.org
> Subject: Re: [Boulder.pm] Boulder-pm Digest, Vol 39, Issue 9
> Message-ID: <20120822160546.GA29148 at thunderdome.ieee.org>
> Content-Type: text/plain; charset=iso-8859-1
> 
> On Wed, Aug 22, 2012 at 09:01:41AM -0700, Ed Dow wrote:
> > 6. Re: Roll Call (Ed Dow)
> > 
> > Foo... always glad to have a fellow tech interested in Perl, no matter how "noobish" the questions.? Throw some out here.? Who knows you might ask something that hasn't been discussed in a while or maybe never.? ;-)
> > 
> > Here's a brain tickler for everyone.... write a quine (a program that outputs itself exactly) in Perl.? This was a question I was asked in a recent interview.? In my opinion, completely unfair and technically usless but everything is fair game in the interviewing process.? 
> 
> I'm a cheater:
> 
>     #!/usr/bin/perl
> 
>     system("cat $0");
> 
> Walter
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 22 Aug 2012 09:29:41 -0700
> From: Kate <rise at knavery.net>
> To: Walter Pienciak <wpiencia at thunderdome.ieee.org>, boulder-pm at pm.org
> Subject: Re: [Boulder.pm] Boulder-pm Digest, Vol 39, Issue 9
> Message-ID: <6FF0311B68644C69B6985EC27A3D4978 at knavery.net>
> Content-Type: text/plain; charset="utf-8"
> 
> On Wednesday, August 22, 2012 at 9:05 AM, Walter Pienciak wrote:
> > I'm a cheater:
> > 
> > #!/usr/bin/perl
> > 
> > system("cat $0");
> > 
> 
> I'm pretty sure that's idiomatic Perl (or at least idiomatic Unix programming), but if I was feeling snarky I'd just install Quine.pm via CPAN, curse at it for a while when it fails to install due to Mac issues, grab my linux laptop instead because this quine is for something mission critical and I can't afford to waist time on incompatibilities and anyway no-one uses Macs, yadda yadda, "use Quine;", profit. Sadly that's actually a win over some of the stuff I've seen with Ruby gems.
> 
> --
> Kate
> 
> 
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 22 Aug 2012 12:06:44 -0600
> From: Rob Nagler <nagler at bivio.biz>
> To: boulder-pm at pm.org
> Subject: Re: [Boulder.pm] Boulder-pm Digest, Vol 39, Issue 9
> Message-ID:
>     <CAJB=V02Ji8HQp+ByoCTGacByFMqmcB++nFc4FjkDf3nAR9Y-fQ at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Self-replication reminds me of Hofstadter's I am a strange loop:
> 
> http://en.wikipedia.org/wiki/I_Am_a_Strange_Loop
> 
> Rob
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> Boulder-pm mailing list
> Boulder-pm at pm.org
> http://mail.pm.org/mailman/listinfo/boulder-pm
> 
> ------------------------------
> 
> End of Boulder-pm Digest, Vol 39, Issue 11
> ******************************************

> _______________________________________________
> Boulder-pm mailing list
> Boulder-pm at pm.org
> http://mail.pm.org/mailman/listinfo/boulder-pm



More information about the Boulder-pm mailing list