my %attrs = %{shift @$data}
You could say:
my $attrs = (ref($data->[0]) eq 'HASH') ? shift @$data : {}
Then refer to $attrs->{FOO}.
-- Chip Salzenberg, Free-Floating Agent of Chaos
In reply to Re: RFC: CGI::Tables
by chip
in thread RFC: CGI::Tables
by elusion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |