Thread pointer auf hash referenz
(15 answers)
Opened by Graf Herschel at 2015-06-05 12:54
Eine Ref-Stufe weniger ...
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 sub fpic_exif_get { my ( $fn, $hashRef ) = @_; my $exf = new Image::ExifTool; %$hashRef = %{ $exf->ImageInfo( "$fn", "EXIF:*" ) }; return 1; } sub fpic_exif_ls { my %hash; my $fn = "/mnt/images/plane.png"; return 0 if ( ! fpic_exif_get( "$fn", \%hash ) ); foreach ( keys %hash ) { print( "$_ => $hash{$_}\n" ); } } Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"
|