in reply to Enlarging scalars

You can use a template to generate the XML from the two parameters, but in such a simple case, you can probably just declare a function that returns it and takes the two parameters:
#! /usr/bin/perl use strict; use warnings; print "Hoeveel?\n"; my $hoeveel = <STDIN>; chomp $hoeveel; print "You typed: $hoeveel\n"; sub xml { my ($y, $z) = @_; return << "EOT"; <g transform="translate(-124.85653,$y)" id="layer$z"> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal +;font-stretch:normal;font-size:126.0375061px;line-height:125%;font-fa +­mily:Arial;-inkscape-font-specification:'Arial, Normal';text-align:s +tart;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anch +or:start;fill:#000000;fill-opacity:1;stroke­:none;stroke-width:1px;st +roke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" x="-45.714272" y="235.21936" id="text3336"><tspan id="tspan3338" x="-45.714272" y="235.21936">a</tspan></text> </g> EOT } my $y = -931.96483; my $z = 1000; for (my $i=1; $i <= $hoeveel; $i++) { $y += 155; ++$z; print xml($y, $z); };

huck's advice about not redeclaring the variables inside the loop holds.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Enlarging scalars
by Anonymous Monk on Jun 12, 2017 at 15:11 UTC
    It's clearly SVG, and re-using the id values for the text and tspan elements may or may not cause trouble.