Shambler #1 Yes, the variable in$ is not accessible in the function check().Either make it a global variable or pass it in the function call.