Perl: the Markov chain saw | |
PerlMonks |
Re^3: How do I get an exclusion with grep?by kcott (Archbishop) |
on Apr 27, 2020 at 10:15 UTC ( [id://11116118]=note: print w/replies, xml ) | Need Help?? |
You've only provided snippets of code which has proven problematic. For instance, you have
but don't show the &base_path code. Is it from a module? Did you write it? You also have several lines of code like these:
but don't show any context. Are those strings hard-coded as shown? They actually look like return values from textify(). It's also unclear what the comments about preferences mean; for example, what does "# I'd like to use the word 'Westerns' only" refer to? — why not just write 'Westerns' instead of 'Westerns in Crisis'? And then there's the array @cross_files whose value you show as an arrayref. Next to it is textified which should probably be $textified if its value is also an arrayref. The end result of this is a lot of guesswork and assumptions which are not helpful in providing you with a straightforward answer. I put together an SSCCE to test all the possible things that I think you might be doing: it's in the spoiler below. The output is hundreds of lines long so I won't post it here: it should run without any problem with the OS and Perl version you indicated. I couldn't replicate "Everything is getting right appended currently." as you stated in the OP. In fact, I got the expected output for everything except when filenames contained underscores. Reviewing what I've provided may help you to solve your problem. If not, please write your own SSCCE and post it. Use only sufficient sample data to demonstrate the issue and do not include code that isn't relevant to the problem: it should only be enough to demonstrate whatever is going wrong. Here's my SSCCE (in the spoiler): <Reveal this spoiler or all in this thread>
— Ken
In Section
Seekers of Perl Wisdom
|
|