http://qs321.pair.com?node_id=26404


in reply to (jcwren) RE: RE: luke_repwalker.pl
in thread luke_repwalker.pl

I'll jump in. Here is how to use a hash slice:

$csv->print ($fh, [ $nodehash->{$_}->{nodeid}, $nodehash->{$_}->{title}, $nodehash->{$_}->{rep}, $nodehash->{$_}->{date} ] ) # Can be written like: $csv->print ($fh, [ @{ $nodehash->{$_} }{ qw(nodeid title rep date) } ] )

Note that the syntax for getting a hash slice from a reference is a bit ugly. Being able to use

$hashref->@{qw(this that other)}
has been proposed but I haven't seen a patch for it.

        - tye (but my friends call me "Tye")