in reply to Object Method Usage
When you say "I don't know how many lines I need to pass to this object", what exactly do you mean? In other words, if you sat down with pen and paper, how would you write instructions for another person to determine how many lines would fit? If you can answer that, we might be able to help you.
Side note, I would change your method call to something like this:
# we've taken off the word 'Array'. We already know it's an array + :) $pdf->label(@label); # or, if @label might have more than for elements $pdf->label(@label[0 .. 3]); # or if it has four or fewer elements: $pdf->label(@label[0 .. $#label]);
Depending on which of the above you need, it's easier for an experienced programmer to read (and might be more robust).
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
|
|---|