I can't check this right now, but I believe you can do it like this: $Line = "some string"; @array = split //,$Line; #split on null foreach(@array){ $char = read_char($_); }
-----Original Message----- From: richard noel fell To: [EMAIL PROTECTED] Sent: 3/3/02 6:28 PM Subject: reading one character at a time Is there a perl function that reads one character at a time from a string and and returns that character? Something like the following: $Line = some string; foreach ($Line){ $char=read_char($_);} Thanks, Dick Fell -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]