"R. Joseph Newton" wrote:
>
> Andrew Gaffney wrote:
> >
> > sub generate_report_html([EMAIL PROTECTED]@) {
> > my ($title, $columns, $data) = @_;
>
> $data is prototyped as an array/list, but you receive it here as a scalar. If
> you must use the damned prototype, it should be:
> sub generate_report_html([EMAIL PROTECTED]@)
^^
^^
> or your p[arameter get should be:
> my ($title, $columns, @data) = @_;
Please read the 'Prototypes' section of perlsub.pod. Andrew had $data
prototyped as a reference to an array which is a scalar value. The
prototype '\\@' is an error and won't run. If you want to use @data
instead of $data then the prototype should be ($\@@) but that will copy
the entire array and not just a single scalar.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>