Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi, Thanks for looking into this. But unfortunately I am executing with reference only the same as I quoted earlier i.e. Data::Dumper->Dump($arrayReference) .

Actually even if one were to try Data::Dumper->Dump(@$arrayReference). They would run into usage error and not an output. But since you asked me that. what was your reason for doubting that? there might be some clue for me in your observation.

Keeping in mind your doubts. I thought would share with you sample usage and let see if you can point out some error in that.

#!/usr/bin/perl -w use strict; use Data::Dumper; $Data::Dumper::Useqq = 1; my $abc=['cde','bdef','dummy', " \n"]; print (Data::Dumper->Dump($abc) . "\n"); #this will work fine print (Dumper($abc) . "\n"); #this will work fine print (Data::Dumper->Dump(@$abc) . "\n"); # this will give usage error + as I mentioned earlier. 1;

Note: this is not my real code. just a simple example of how I am using array reference with this module.

Output: $VAR1 = "cde"; $VAR2 = "bdef"; $VAR3 = "dummy"; $VAR4 = " \n"; $VAR1 = [ "cde", "bdef", "dummy", " \n" ]; Usage: PACKAGE->new(ARRAYREF, [ARRAYREF]) at /tmp/ab123.pl line 8

Kindly look into this and let me know if I am missing anything.

PS: anyway question is

1) for me why one of the elements(1st element) is not being seen.

2) what could it possibly be?

3) and is there any way to identify it?


In reply to Re^4: trying to identify the exact data stored from dump - [ ' ]; by asham
in thread trying to identify the exact data stored from dump - [ ' ]; by asham

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-03-19 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found