Ken Slater <kenslate...@gmail.com> writes: Harry wrote: >> use Image::ExifTool qw(:Public); >> >> # ---- Simple procedural usage ---- >> >> # Get hash of meta information tag names/values from an image >> $info = ImageInfo('a.jpg'); >> >> # ---- Object-oriented usage ---- >> >> # Create a new Image::ExifTool object >> $exifTool = new Image::ExifTool; >> >> # Extract meta information from an image >> $exifTool->ExtractInfo($file, \%options); >> ------- --------- ---=--- --------- -------- >> >> But my lame attempts at using this fail miserably:
[...] >> There is not enough information in that pod page for me to understand >> how to really get at the information. No doubt my lack of skill is >> awfully evident here. This is way to grand of a statement...unless you notice the little word `me' in there. But the fact that you were able to extract all of what is in your script from that page is quite phenomenal... at least when seen through my eyes. Your script gives me a lot to work with.. thanks for the effort! ------- --------- ---=--- --------- -------- A brief aside to John K: Harry wrote: >> Outputs a mess: >> ./myscript t1.jpg >> ,---- >> | sh: 1: Syntax error: Unterminated quoted string >> | sh: 1: ������:+Y�0y�: not found >> | sh: 1: �: not found >> | sh: 1: Syntax error: EOF in backquote substitution >> | >> | [...] >> `---- [...] "John W. Krahn" <jwkr...@shaw.ca> responded: > The "sh" at the beginning of the error message means that the _shell_ > is trying to run your program, not perl, and is reporting the error. > > The _first_ line of your program _must_ be: > > #!/usr/bin/perl Thanks for your other good tips, this one is actually only misplaced due to the fact that I did NOT include the `shebang' in my clipping. The output shown however was obtained with the full perl shebang in place. I tested it again just now. It still indicates the shell trying to run the commands but there must be some other reason than a missing `shebang'. The whole thing (though thoroughly terrible) was: ------- 8< snip ---------- 8< snip ---------- 8<snip ------- #!/usr/local/bin/perl use strict; use warnings; use Image::ExifTool qw(:Public); # Create a new Image::ExifTool object my $exifTool = new Image::ExifTool; my $info; while (<>) { chomp; # Extract meta information from an image # $exifTool->ExtractInfo($file, \%options); $exifTool->ExtractInfo("$_"); } print $info ----------- END --------------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/