On Thu, Jan 1, 2009 at 2:14 AM, John Refior <jref...@gmail.com> wrote:

>
> > Nifty.  One of the goals of a JAPH is to demonstrate one or more of
>> > Perl's advantages/quirks.
>>
>> Fun.  New concept for me.  Here's a less interesting one I wrote after
>> reading your emails:
>>
>> sub japh { $_ = shift; print $1 while /(.)/gs; } print $/ unless
>> &japh("Just another Perl hacker,");
>>
>
> A more finished version:
>
> use strict; use warnings; sub japh { $_ = shift; s/\n/ /gs; chop; print $1
> while /(.)/g; } print ',',$/ unless &japh("Just\nanother\nPerl\nhacker\n");
>
> Regards,
>
> John


These are fun.  A more, more finished version:

sub japh{$_=$_[0];s/[$:]/$"/gs;chop;print $& while/(.)/g;}print
chr q:44:,$/ unless&japh(qq=Just$/another$/Perl$/hacker$/=)&&1;

John

Reply via email to