On Tue, Nov 01, 2011 at 11:30:11PM +0100, John Delacour wrote:
> At 18:39 -0400 1/11/11, Ronald J Kimball wrote:
> 
> >Perhaps you meant something like this:
> >
> >#! /usr/bin/perl
> >use strict;
> >my $switch_on;
> >while (<>) {
> >  $switch_on = 1 if /<caption>/;
> >  $switch_on = 0 if $switch_on && s/td>/th>/g;
> >  print;
> >}
> >__END__
> 
> Yes, except that I'd write 'and' and not '&&', not being much of a golfer.

I'll use either depending on the context (or sometimes on my mood).  Of
course, either works, as long as one is careful about the difference in
precedence.

Ronald

P.S.  I should have been clearer in my first post, then I wouldn't have
started this kerfuffle.  Sorry!

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to