Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Interpreting MS-ASCII - anyone have a filter?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Larry Rosler  
View profile  
 More options Jun 20 1999, 3:00 am
Newsgroups: comp.lang.awk, comp.lang.perl.misc
From: l...@hpl.hp.com (Larry Rosler)
Date: 1999/06/20
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
In article <x7ogia8ec7....@home.sysarch.com> on 20 Jun 1999 22:41:44 -
0400, Uri Guttman <u...@sysarch.com> says...

> >>>>> "LR" == Larry Rosler <l...@hpl.hp.com> writes:
...
>   LR>   s/([\x80-\x9F])/defined $t{$1} && $t{$1}/eg;

> i think s/defined/exists/ would look better. if someone mapped a hex
> code to undef yours would fail but that is a stupid thing to do.

>   LR> Maybe someone should name this idiom after me.  No one else seems
>   LR> to use it!  :-)

> i dub this the rosler substitution!

That's a lot better than the RoslerIAN Substitution :-|

> (but only if it uses exists)

Sure.  'exists' is one character shorter than 'defined'.

On a slightly more serious note:

That construction is analogous in some way to this one:

my $x = $y || $z; # Use TRUE value or default value.

But it is harder to describe:

my $x = $y && $z; # Replace TRUE value by specified value.

So I prefer the Rosler Replacement -- which Rocks!

--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
l...@hpl.hp.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.