The problem got solved about the number of character inputs when my unix administrator ported the program to another unix box with bash.So , it really was a problem/limitation with the env (the unix env where i was testing the script)and not perl.Now , the script is taking any length of input in the new unix box and the problem is solved.