in reply to running perl script makes my external HDD read-only
Most likely this is because your kernel reads through the directory structure and while doing so finds that the directory structure has become broken. It then switches the filesystem to read-only as a safety measure.
You can confirm this by looking into your kernel log, there should be a message about this, and you can possibly replicate this from outside of Perl by using
.ls -lR /
Perl itself has no capability to set a filesystem to read-only unless the user that runs Perl has those permissions already.
|
|---|