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

Re: [FWP] Goal oriented programming



>>>>> "Chaim" == Chaim Frenkel <chaimf@pobox.com> writes:

Chaim> Ohh, lets play...

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

Or even the simplest:

	warn "big char!" if /[\x80-\xff]/;

I'm sure that'll time out even faster than the tr///.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me

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