in reply to typecast int to string
I suspect it is not perl that is sending the string but your script or the module you are using. In that case it would be very helpful to know this script and/or the modules your are using.
Similar to the particle-wave duality in physics you could say that there is a string-number duality in perl. You can't test a variable whether it is a number or a string because it is both. Ok, you can use a regex and find out that there is nothing in a string that looks like a number, but the following just works (and would at most print a warning message if you turn on warnings):
> perl -e 'print 1+"buss";' 1
If the module you are using is doing some automatic testing with regexes, you might have luck with just adding a space to your string. Otherwise there must be something to specify the type
|
|---|