Tutorial by Examples

use Data::Dumper; my $data_structure = { foo => 'bar' }; print Dumper $data_structure; Using Data::Dumper is an easy way to look at data structures or variable content at run time. It ships with Perl and you can load it easily. The Dumper function returns the data structure serialized in a...
Sometimes Data::Dumper is not enough. Got a Moose object you want to inspect? Huge numbers of the same structure? Want stuff sorted? Colored? Data::Printer is your friend. use Data::Printer; p $data_structure; Data::Printer writes to STDERR, like warn. That makes it easier to find the outpu...
my @data_array = (123, 456, 789, 'poi', 'uyt', "rew", "qas"); print Dumper @data_array; Using Data::Dumper gives an easy access to fetch list values. The Dumper returns the list values serialized in a way that looks like Perl code. Output: $VAR1 = 123; $VAR2 = 456; $VAR3 ...
The function show is automatically exported when use Data::Show; is executed. This function takes a variable as its sole argument and it outputs: the name of the variable the contents of that variable (in a readable format) the line of the file that show is run from the file show is run from ...

Page 1 of 1