Hi - Should be the same. The only thing I can think of is that there is a LF character in your 4th (and last) field in the line.
Try chomp on the line before you move it to the array ans see what happens then. Aloha => Beau. -----Original Message----- From: File Send [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 9:17 AM To: [EMAIL PROTECTED] Subject: Perl types? Hello, I am hoping to get some help solving a problem I am having with what I am assuming is only a problem for me due to my ignorance when it comes to perl data types. I have a script that reads some information from a comma separated file. The file contains 4 fields. The last field is the one I am having problems with. I read the fields into an array called @settings and I retrieve the 4th fields with $settings[3] and assign it to $signon ($signon = $settings[3]). I then append the field to another string and calculate a CRC-16 from the full string. I don't get the result that I expect. Now on the other hand, if I set a variable up as $signon = "VALUE" where VALUE is identical to what I would have read from the fourth field of the file, I get the correct result. So to get it to work I would have to code in the signon which is not an option for me. I have verified that what I am reading from the file is the correct value by printing $settings[3] to the screen. So my question is how do I make perl treat $signon = $settings[3]; and $signon = "VALUE"; exactly the same string wise? Things I have tried: $signon = "$settings[3]"; $signon = '$settings[3]'; $signon = ${settings}[3]; Skipped the assignment of $signon and appended $settings[3] directly to the string. Re-typed my file (very carefully) Now I am stumped. Help would be great. thanks Ollie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]