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

Re: [FWP] Goal oriented programming



>>>>> "VB" == Vicki Brown <vlb@cfcl.com> writes:

VB>     foreach (split //, $line) {
VB>       $num = ord $_;
VB>       $num > 127 and warn "ASCII value exceeds 127.\n";
VB>     }

VB> What I found most interesting when looking at the suggested replacement was
VB> not just the change in the loop. One could as readily have written

Ohh, lets play...

	warn "ASCII value exceeds 127.\n"
		if ($_=$line) =~ tr/\0-\x7f//c

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org