in reply to Re: Re^6: Substituting Newline Characters
in thread Substituting Newline Characters
I think it's very clear what's going on here, and you still get the benefit of only maintaining a single copy of the code.BEGIN { my $merge_code = <<'EOC'; sub %s { my ($data) = @_; while ( $some_condition ) { # big loop, no embedded loops $count = $count1 %s $count2; } } EOC eval sprintf $merge_code, merge => '+'; eval sprintf $merge_code, unmerge => '-'; }
Makeshifts last the longest.
|
|---|