in reply to appending a variable

You still haven't understood, or are ignoring, the plethora of advice you were given in To read files from two dir that amounts to:

We aren't interested in distracting problem domain specific identifiers and other cruft that is not related to the issue at hand. Write some code that demonstrates the problem so it is trivial for us to see it too, and so that you can easily play around with the code to see what works and what breaks. With Perl it is trivial to write a little test script and it is a really good way to explore an issue without having all the baggage of the original script you are trying to fix. This is really useful even if you have no intention of asking anyone else for help. It is vital when you do intend to ask for help so that you don't waste our time and you don't waste your own time.

Remember: being truly lazy is getting the job done with the least overall effort. Often that means more effort up front to save a lot of effort later.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^2: appending a variable
by Fletch (Bishop) on Apr 29, 2022 at 01:33 UTC

    Unfortunately this has the hallmarks (as happens here time to time) of someone who's in over their head and is trying to muddle through getting random people on the internet to do the work they've represented themselves as being capable of doing. As has played out they were able to get the first thing "working" now they're hitting another block because they don't know the basics and aren't able to apply what they don't know (i.e. the persistent syntax errors with multiple braces or no braces edit and not understanding variable scoping /edit; not knowing how to delimit variable names in interpolation or thinking there's multiple levels of interpolation as in the last "attempt" above; edit and again, not bothering to try the FAQ they're pointed at (cue the music) /edit).

    The best thing would be for the OP to go back to their manager / supervisor / whomever and own up and explain they're in over their head, they're not the person to make these changes, and to be that person they need more training / to read more / to take time to actually learn how to program.

    Edit: Personally, I'm at the last phase mentioned here WRT "You can't just make s<tuff> up . . .", and I'll just be kibitzing tangentially like with the concatenation vs interpolation deparse rather than trying to inculcate porcine singing.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      I agree completely, which is why I continue to beat on the process and best practice drum rather than feed the OP fish.

      It's tempting, but meaner than I feel at the moment, to down vote the fish feeding replies, even though most of them are great replies and in other contexts highly deserve an up vote.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond