Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $base64_image = encode_base64($buf); my $text = do { local( @ARGV, $/ ) = "test_template.svg" ; <> } ; $text =~ s/##([a-zA-Z0-9_\.]+)##/<TMPL_VAR name="$1">/g; my $photo_count = 1; while ($text =~ s/\Q$base64_image/<TMPL_VAR name="photo_$photo_count"> +/s){ $photo_count++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Substituting base64 encoded text
by oko1 (Deacon) on Jan 09, 2011 at 01:01 UTC | |
|
Re: Substituting base64 encoded text
by zwon (Abbot) on Jan 09, 2011 at 04:37 UTC |