Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^3: Getting attachments from request in perl

by johngg (Canon)
on Jan 18, 2018 at 18:15 UTC ( #1207480=note: print w/replies, xml ) Need Help??

in reply to Re^2: Getting attachments from request in perl
in thread Getting attachments from request in perl

I don't exactly know how should I use Data::Dumper

Best to have a quick look at the Data::Dumper documentation. The Dumper() function is exported by default and gives a pretty crude picture of the data. Give it an array and it will treat each element as a separate variable but give it a reference to the array and you see an anonymous array. Dump() and its faster but not always available sibling Dumpxs() are fiddlier but more useful as they can give a more accurate picture.

Here's a brief example.

johngg@shiraz ~ $ perl -Mstrict -Mwarnings -MData::Dumper -E ' my @atts = qw{ att1 att2 att3 }; say Dumper( @atts ); say Dumper( \ @atts ); say Data::Dumper->Dump( [ \ @atts ], [ qw{ *atts } ] ); say Data::Dumper->Dumpxs( [ \ @atts ], [ qw{ *atts } ] );' $VAR1 = 'att1'; $VAR2 = 'att2'; $VAR3 = 'att3'; $VAR1 = [ 'att1', 'att2', 'att3' ]; @atts = ( 'att1', 'att2', 'att3' ); @atts = ( 'att1', 'att2', 'att3' );

I hope this is helpful.



Replies are listed 'Best First'.
Re^4: Getting attachments from request in perl
by Stetec (Novice) on Jan 18, 2018 at 23:23 UTC
    Thank you for explanation. When I use Dump function on attachments array I get string "@attachments = ();". I really don't know what kind of anomaly is this. I just found out that I can get nothing from request, not only file.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2019-02-16 22:06 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (95 votes). Check out past polls.