Re: extracting exif information from images

2012-02-11 Thread Harry Putnam
"John W. Krahn" writes: >> #!/usr/local/bin/perl >> >> use strict; >> use warnings; > > Could it be that your editor is putting a BOM as the first two > characters of your program? It never has before but if so would that show up using the `l' (ell) operator in sed? Or could a BOM sneak right by

Re: extracting exif information from images

2012-02-11 Thread John W. Krahn
Harry Putnam wrote: 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.

Re: How to process just part of a file

2012-02-11 Thread John W. Krahn
Eric Pement wrote: You can also match on line number: if ( $. == 100 ... $. == 150 ) { ... } That is the verbose way to write: if ( 100 .. 150 ) { ... } or a combination: if ( $. == 200 ... /^your reg[ex]/ ) { ... } If you are going to be verbose then: if ( $. == 2

Re: How to process just part of a file

2012-02-11 Thread Eric Pement
On Feb 9, 8:08 am, clay.lov...@carquest.com (Clay Lovett) wrote: > I have inherited a script that processes the cron and comments stuff out for > month end processing. We have added some store that do not run the same > monthly calendar as the rest of the stores. What I need to know is how to add

Re: extracting exif information from images

2012-02-11 Thread Harry Putnam
Ken Slater 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 objec

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Kevin Spencer writes: > On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: >> >> But these command line attempts fail: >> >> (all on one line) >>  perl  -e 'my ($seven, $nine) = >>    (stat('./SweetwatterPk-016.jpg'))[7, 9]; >>        print "$seven and $nine"' >> >> output: >>  syntax error a

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Rob Dixon writes: > Something like this perhaps? > > perl -e "print join ' and ', (stat shift)[7,9]" ./SweetwaterPk-016.jpg Nice... yes Thanks > But I would think the modification time (stat 9) wouldn't be of much > use without formatting it. In this case it was just for a quick command lin