[Israel.pm] Perl and Debugging question

Levenglick Dov-RM07994 dovl at freescale.com
Mon May 14 09:26:07 EEST 2007


Assuming that $self is a blessed hash, you could do:
$new_self = map {+{$_,$self[$_]}} grep !/LONG_KEY/,keys %$self;

Or something to the affect, I didn't try to run the code. 


 
Best Regards,
Dov Levenglick
DSP SoC System and Applications Engineer,
Network and Computing Systems Group
Freescale Semiconductor Israel
Tel. +972-9-952-2804
The information contained in this email is classified as:
[ ] Freescale General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Proprietary
[x] Personal Memorandum

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Peter Gordon
Sent: Sunday, May 13, 2007 21:29
To: perl at perl.org.il
Subject: [Israel.pm] Perl and Debugging question

I have a class which I want to debug, and I normally use

<DB> x $self

to dump the whole structure.

On this occasion, one of the elements is a string a few megabytes long,
and I don't really want to dump the whole string.

What would be the nicest way to suppress printing of this particular
element.

I could print each element in turn, but that is inelegant.

Thanks,

Peter


_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list