Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: (jcwren) RE: RE: luke_repwalker.pl

by tye (Cardinal)
on Aug 06, 2000 at 08:35 UTC ( #26404=note: print w/ replies, xml ) Need Help??


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")


Comment on RE: (jcwren) RE: RE: luke_repwalker.pl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://26404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2015-07-30 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls