in reply to RFC: CGI::Tables
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: CGI::Tables (topicalize with for)
by Aristotle (Chancellor) on May 10, 2003 at 18:13 UTC | |
by chip (Curate) on May 11, 2003 at 01:14 UTC | |
by Aristotle (Chancellor) on May 11, 2003 at 02:19 UTC | |
by chip (Curate) on May 11, 2003 at 03:28 UTC | |
by Aristotle (Chancellor) on May 11, 2003 at 05:04 UTC |