Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: How do I get an exclusion with grep?
in thread How do I get an exclusion with grep?

You've only provided snippets of code which has proven problematic. For instance, you have

my $root_link = base_path('link');

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:

my $magic = crossover_magic( big => ['Horror']); my $magic = crossover_magic( big => ['Westerns in Crisis']);

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):

— Ken

Replies are listed 'Best First'.
Re^4: How do I get an exclusion with grep?
by Lady_Aleena (Priest) on Apr 27, 2020 at 13:07 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11116118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-25 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found