in reply to Re: Need Help in threading perl
in thread Need Help in threading perl

threadccod_new.pl: open : Permission denied at threadccod_new.pl line 75. <\p> Iam not sure why getting permission for 4th and so on file and not for 1st to third file .

Replies are listed 'Best First'.
Re^3: Need Help in threading perl
by Corion (Patriarch) on Jul 31, 2024 at 11:05 UTC

    You are using chdir from within a thread. I would avoid that, since it is never clear between operating systems, whether the "current directory" is per-thread or global per program.

    Also, replace

    system "mkdir $branchdir";

    with mkdir:

    mkdir $branchdir;

    Also, output the filename and path in your error message. I already suggested that to you but you ignore it. Please explain why you ignore my advice.

      I din;t ignored i posted same in earlier meesage Thread 1 terminated abnormally: threadccod_new.pl: open /home/sbi/Desktop/SRA/CCOD_TEST: fileneme is Z_CCOD_00327.txt$! at threadccod_new.pl line 77.

        Remove the chdir line in your code.

        Also, use absolute directory and filenames in all your code, especially for $branchfile.