Tassos,
I'm
not sure how to view or convert the "invisible" characters. You might try
something like this to remove them. This will find anything that is not an
alpha, _, numeric, or legitimate white space and replace it with nothing in
$string. The caveat here is that it will also remove anything like #, @,
^, *, etc. that might be in the string. You could add those to the regular
expression of course but I didn't want to go to the effort of adding every
special character on the keyboard.
$string =~ /[^\w\s\d]//g
Matt Schneider
Programmer/System Administrator
SKLD Information
Services, LLC
-----Original Message-----Hi all,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 8:48 AM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] deleting "invisible" characters
I have a file that contains some "invisible" characters. These characters
look like white spaces when I open the file in a text editor. Is there
a way I can make them visible so that I can manipulate them with a Perl
script? Is there a Perl function that allows me to delete any "invisible"
character? Can I convert them to hex/octal values?
Thanks,
--tassos