Все вопросы: [data-dumper]
4 вопросов
How can I control the formatting of Data::Dumper's output?
I am using Data::Dumper::Dumper() method. The output is good, but can be made little compact and more good looking. How I can control it? What are the better alternatives?
In Perl, how can I write the output of Dumper to a file?
How can I make Data::Dumper write a dump into a file?
Как мне контролировать имена переменных в Perl Data :: Dumper?
У меня есть простой сценарий Perl: #! /usr/bin/perl -w use strict; use Data::Dumper; my %foo = ( 'abc' => 1 ); print Dumper(\%foo); Выводит: $VAR1 = { 'abc' => 1 }; Как мне заставить его выводить это вместо этого? %foo = ( 'abc' => 1 ...
Как мне прочитать выходные данные Data :: Dumper?
Допустим, у меня есть текстовый файл, созданный с помощью Data::Dumper , в соответствии со строками : my $x = [ { foo => 'bar', asdf => undef }, 0, -4, [ [] ] ]; Я бы хотел прочитать этот файл и получить обратно $x. Я пробовал это: my $vars; { undef $/; $vars = <FILE>;...