in reply to Re^3: Automating execution of shell scripts
in thread Automating execution of shell scripts
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.
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Automating execution of shell scripts
by AnomalousMonk (Archbishop) on Sep 20, 2021 at 18:33 UTC | |
by wisely (Initiate) on Sep 23, 2021 at 08:57 UTC | |
Re^5: Automating execution of shell scripts
by BillKSmith (Monsignor) on Sep 20, 2021 at 16:09 UTC |
In Section
Seekers of Perl Wisdom