in reply to Its not working.. String works but not split

Well, if nothing is printed out it is unlikely that they are the same, notwithstanding appearances. Perhaps there are non-printing characters in one of the strings. You could examine each string character by character, doing it something like this, where to demonstrate I put a NUL in the middle of the string.

$ perl -le ' > $str = qq{ab\0cd}; > print $str; > print ord for split m{}, $str;' abcd 97 98 0 99 100 $

Note that the NUL doesn't show up when the string is printed but can be seen when each character's ordinal value is printed.

I hope this is helpful.

Cheers,

JohnGG