Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Data::Dumper How to quote keys while dumping

Thread Tools

Data::Dumper How to quote keys while dumping

Posts: n/a
I am trying to dump a hash using Data:umper.
I need to quote the keys while dumping.

My progarm looks like this

use Data:umper;
$Data:umper::Quotekeys = 1;
$Data:umper::Useqq = 1;

my %tmp ;

$tmp{'1'} = "l";
$tmp{'2'} = "u";

open (STDOUT, ">");
print STDOUT Data:umper->Dump([\%tmp], ['*tmp']);
close STDOUT ;
%tmp = (
1 => "l",
2 => "u"


i need it as

%tmp = (
'1' => "l",
'2' => "u"

Can anyone help out with this

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quote-Dot-Quote Operator C++ 6 06-14-2008 11:34 PM
Datagrid on load; replace all double single quote to single quote to display to user Eric Layman ASP .Net 3 04-14-2007 07:16 AM
replacing strange quote with standard quote Stimp ASP .Net 2 09-20-2006 10:01 AM
Single Quote Versus Double Quote In A href link HTML 3 06-13-2006 12:42 AM
Data::Dumper How to quote keys while dumping kamal Perl Misc 5 08-13-2003 05:41 PM