#!perl -w use strict; my %vars = qw(name Fred); my $tmpl = do { local $/; <DATA> }; $tmpl =~ s/\$([a-zA-Z_]\w*)/$vars{$1}/ge; print $tmpl; __DATA__ This is my template. Here is my $name
perl -e"\$_=qq/nwdd\x7F^n\x7Flm{{llql0}qs\x14/;s/./chr(ord$&^30)/ge;print"
In reply to Re: Interpolating $var in a $string
by pizza_milkshake
in thread Interpolating $var in a $string
by freddo411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |