.can you please get me through how this is workingYour tests are not adequate to understand choroba's suggested code. Try this (demonstrated here under the Perl debugger):
In essence, choroba is testing the value that ends up into $result in the code above. And it adds a quote mark at the end of the string if the value returned by tr/// is odd (meaning that quote marks are unbalanced).DB<1> $string = 'Tetsing " code implementationm'; DB<2> $result = $string =~ tr/"//; DB<3> p $result 1 DB<4> p $string Tetsing " code implementationm
In reply to Re^3: Formatting quotes in a String
by Laurent_R
in thread Formatting quotes in a String
by pavan474
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |