Think about Loose Coupling | |
PerlMonks |
Re: file handingby johngg (Canon) |
on Sep 22, 2018 at 14:56 UTC ( [id://1222840]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|