in reply to file handing
my $openfile = open(DATA, ">$FILE"); #OPEN FILE
Don't try running that code as you are opening the JPEG file for writing and will therefore clobber the contents, probably not what you want. Instead of trying to roll your own file copying/moving code you might be safer following poj's original advice. If you are doing this as a learning exercise then make good back-ups, read the tutorial poj mentions (and the reference doc) and practice on copies of your files to avoid disappointment.
Cheers,
JohnGG
|
|---|