in reply to Re: Array element getting deleted
in thread Array element getting deleted

/methinks your messages reflect the absence of a file named "text.txt" rather than anything that would be resolved by use of strict or warnings. Adding those and running perl -c pl_test/758183.pl returns syntax OK.

OTOH, checking the open:

open(READ, "< test.txt") || die "Cannot open text.txt. $!";

produces this:

Cannot open text.txt. No such file or directory at pl_test/758183.pl line 18.