in reply to Re^2: JSON Formatted String
in thread JSON Formatted String
Before I pass the string to that function, I want to verify whether the received string is in correct JSON format
I know that I can catch the error in particular function can be caught by using $@ variable
I'm confused. You've just answered your own question.
my $valid = eval { $json->decode($input); 1 };
In Section
Seekers of Perl Wisdom