Syntactic Confectionery Delight | |
PerlMonks |
Re^4: Automating execution of shell scriptsby wisely (Initiate) |
on Sep 20, 2021 at 07:51 UTC ( [id://11136867]=note: print w/replies, xml ) | Need Help?? |
Sorry I forgot to mention this was only a snippet of the whole program, and it wasn't exactly accurate to what I had in actual program. I just wanted to illustrate what the direction in which I was headed for solving this. Sorry also that I couldn't just paste the whole code. Anyway in my actual program it turned out that the issue was the scope of the $dir variable in my subroutine as far as I can tell. The program works correctly now. I guess it would be better (also faster?) if it is done in the main program and not in a subroutine, but it was easier for me to follow what I am doing by writing subroutines. I am also not sure how to do what you mention.
In Section
Seekers of Perl Wisdom
|
|