http://qs1969.pair.com?node_id=1163381


in reply to Perl - Remove duplicate based on substring and check on delimiters

You can use chmod to change file's permissions if you have sufficient permissions to chmod the file.

You should check open's success, so you know directly if open was successful or not and you can behave accordingly.

open(my $handle, '>>', $filename) or die "open($filename,w+) failed: $ +!";
edit: fixed typo