more useful options | |
PerlMonks |
Why can't I figure this out?????by JSAWS (Novice) |
on Aug 31, 2022 at 11:36 UTC ( [id://11146554]=perlquestion: print w/replies, xml ) | Need Help?? |
JSAWS has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I have been banging my head against the wall for hours with this, I am using this method in multiple places but somehow it does not work here... Here is the logic: I comapre 2 files (OldPicList and NewPicList) and if values are found in NewPicList only then the relevant dir should be read and the contents written to a file (filenames only). All is generally well, except if the filenames have spaces in them.... example the following list will only print the first 7 items to the file 20141025_211155b.jpg 20141028_140739b.jpg 20141101_160837b.jpg 20141101_160839b.jpg 20141101_160856b.jpg 20141102_112335b.jpg Screenshot_from_2021-02-04_17-38-07.png Screenshot from 2021-02-04 19-13-44.png Screenshot from 2021-02-05 08-59-49.png Screenshot from 2021-02-09 11-48-40.png Screenshot from 2021-02-09 15-46-23.png Screenshot from 2021-02-10 09-46-34.png Screenshot from 2021-02-11 10-06-13.png Screenshot from 2021-02-15 14-52-40.png What puzzles me is that when I print the @array to STDOUT before the FH the output is correct and contains all files (the file list above is the printout of the array, there seems to be an extra char at the end of every line, this might be the issue? completely puzzled..... any help would be greatly appreciated! J
Back to
Seekers of Perl Wisdom
|
|