[boulder.pm] line/loop optimization?

Jessee Porter porterje at us.ibm.com
Tue May 8 12:28:04 CDT 2001




>Is there a better way to do a line by line substitution instead of looping
>through @Keys each line?
>Robert

Something like :

$/ = "";
my $foo = <TemplateIn>;
foreach (keys %ConfigOptions){$foo =~ s|$_|$ConfigOptions{$_}|gis};

may do the job.


--
Cogito Ergo Disclaimo : I am speaking for myself, not my employer.





More information about the Boulder-pm mailing list