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

Re: [MacPerl] Question - Substitution



Actually, due to the fact that there were three substitutions, it's
better to put the three into a single for loop with a single test
beforehand.  Like so:

	$curLine = join( "\n", @theInfo );
	next if $curLine !~ /$theName/;
	foreach( @theInfo ){
		s/etc....
		}

The next-if statement keeps the program from going into the for loop at
all unless it is necessary to do so and then it only iterates through
the loop once for all changes.  :-)

Thanks again to Chris et al for their suggestions and patience in my
stupidity.  :-)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch