Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Error while taking 'Scalar of scalar'

by tirwhan (Abbot)
on Jul 04, 2007 at 12:07 UTC ( [id://624870]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %color = ( lavender => $im->colorAllocate(230,230,255),
                   lightblue => $im->colorAllocate(173,216,230),
    ...
    while (@ary) {
             my $genecolor= coloring ();
             $im->filledRectangle($X1,$Y1-20,$X2,$Y2,$color{$genecolor});
    
  2. or download this
     sub coloring{
      my @color= @{$_[0]};
      my $color_no=int(rand(scalar @color));
      return $color[$color_no];
    }
    
  3. or download this
    my %color = ( lavender => $im->colorAllocate(230,230,255),
                   lightblue => $im->colorAllocate(173,216,230),
    ...
             my $genecolor= coloring ([keys %color]);
             $im->filledRectangle($X1,$Y1-20,$X2,$Y2,$color{$genecolor});
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://624870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found