in reply to Error while taking 'Scalar of scalar'
If you look up the perldiag, or in your local system, man perldiag or perldoc perldiag, you'll find the error explanation:
If you put use diagnostics; line near the top of your program, it will give you the error explanation automatically.Can't use string ("%s") as %s ref while "strict refs" in use (F) Only hard references are allowed by "strict refs". Symbolic ref +erences are disallowed. See perlref.
I don't know what the filledRectangle() method expects as the fifth argument. If it says a SCALAR reference or a reference to a SCALAR then you must pass it as:
Otherwise, if it says nothing about references, then just pass in the variable as is:$im->filledRectangle($X1,$Y1-20,$X2,$Y2,\$genecolor);
$im->filledRectangle($X1,$Y1-20,$X2,$Y2,$genecolor);
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|