Your problem is here: ... $halfwidth$, ... ^^ If that is not a typo in the email, Perl is trying to interpolate $, which is a special variable. -K > From: "Douglas P. McNutt" <dmcnutt@macnauchtan.com> Date: Sun, 13 Aug 2000 > 17:37:15 -0600 To: macperl@macperl.org Subject: [MacPerl] Where has my comma > gone? > > $mcEol = ";\n"; # end-of-line terminator for a MiniCad command $halfwidth = > sprintf($cadFormat,$atoms[2]/2); $halfheight = > sprintf($cadFormat,$atoms[2]/2); > > print CADOUT > "$SymbolDecode{$atoms[1]}(-$halfwidth,$halfheight,$halfwidth$,-$halfheight)$mc > Eol"; > > Produces this output Rect(-0.038,0.038,0.038-0.038); Note the missing comma > before the fourth argument. > > This is my workaround: print CADOUT > "$SymbolDecode{$atoms[1]}(-$halfwidth,$halfheight,$halfwidth"; print CADOUT > ", -"; print CADOUT "$halfheight)$mcEol"; > > Oval(-0.050,0.050,0.050, -0.050); > > Does anybody have any explanation of the curious syntax rule that seems to be > applied? Is there a more readable workaround? > > I could understand hard binding of a unary minus to $halfheight even though it > is text but dropping the comma?? This doesn't work either. print CADOUT > "$SymbolDecode{$atoms[1]}(-$halfwidth,$halfheight,$halfwidth,"; print CADOUT > "-"; print CADOUT "$halfheight)$mcEol"; -- > > -> From the U S of A, the only socialist country that refuses to admit it. <- > > # ===== Want to unsubscribe from this list? # ===== Send mail with body > "unsubscribe" to macperl-request@macperl.org > # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org