in reply to Re^6: Modification of a read-only value attempted
in thread Modification of a read-only value attempted

exists is your friend.

you need to test for existence of both {creden} and {creden}{uName} in an if condition

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^8: Modification of a read-only value attempted
by chandantul (Scribe) on Feb 02, 2021 at 01:07 UTC

    The "creden" value is null like the following "creden": null, and other one is the following "creden": { "uName": "5xxxxxxx" }, set the below condition for them and it works!

    if ($response[$i][$j]{creden} ne "" ) { $responsuname = $responsetextall[$i][$j]{creden}{uName +}; } else { $responsuname = "No UNAME"; }