Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: dumping variables automatically with their name?

by trwww (Priest)
on Mar 25, 2014 at 22:19 UTC ( #1079745=note: print w/ replies, xml ) Need Help??

in reply to dumping variables automatically with their name?

I use Data::Dumper->Dump( ARRAYREF, ARRAYREF ). You have to pass in the name, but it gives you what you're asking for:
use warnings; use strict; use Data::Dumper; my @data = (qw(foo bar bazz)); print Data::Dumper->Dump([\@data], ["data"]);
$data = [ 'foo', 'bar', 'bazz' ];

Replies are listed 'Best First'.
Re^2: dumping variables automatically with their name?
by LanX (Chancellor) on Mar 31, 2014 at 19:48 UTC
    I knew, thats what I tried to avoid.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2016-08-29 10:15 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (401 votes). Check out past polls.