[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Re: about that JAPH of yours...



Rich Morin wrote:
> 
> At 9:04 AM -0500 2/10/01, Kevin Reid wrote:
> >for$y(0..31){for(0..31){print$_&$y?$":'*'}print$/}
> 
> nice (not the formatting; the logic :-)
> 
> -r
> --
> --
> http://www.cfcl.com/rdm
> email: rdm@cfcl.com
> phone: +1 650-873-7841
> 
> ==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
> ==== Send email to <fwp-request@technofile.org> with message _body_
> ====   unsubscribe

map is your friend :-)  catch is that the return 
value is printed when the #! exits (at least on 
linux & solaris).

#!/opt/bin/perl

#for$y(0..31){for(0..31){print$_&$y?$":'*'}print$/}

 for$a(0..31){((map{$_&$a?$":"*"}(0..31)),$/)}

-- 
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 lembark@wrkhors.com                                   800-762-1582

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe