Thread Data::Dumper bug ? (5 answers)
Opened by mark05 at 2012-02-01 17:10

GwenDragon
 2012-02-01 17:27
#155805 #155805
User since
2005-01-17
14760 Artikel
Admin1
[Homepage]
user image
Data::Dumper 2.128 unter Perl 5.10.1

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;

my ($startd,$stopd) = '01.12.2011 31.12.2011' =~ /^(.*)\s(.*)$/smx ;

print "\$startd=$startd\n";
print "\$stopd=$stopd\n";

my $tst = { start=>$startd , stop=>$stopd };

print Dumper $tst;

print q($tst->{'start'} ),"$tst->{'start'}\n";
print q($tst->{'stop'} ),"$tst->{'stop'}\n";

erzeugt:
Code: (dl )
1
2
3
4
5
6
7
8
$startd=01.12.2011
$stopd=31.12.2011
$VAR1 = {
'stop' => '31.12.2011',
'start' => '01.12.2011'
};
$tst->{'start'} 01.12.2011
$tst->{'stop'} 31.12.2011

Last edited: 2012-02-01 17:28:30 +0100 (CET)

View full thread Data::Dumper bug ?