Lou Hernsen wrote: : and if I want to include certain german umlutted vowels like : ö and ä i would add them like this? : $string =~ tr/-_a-zA-Z0-9öä//cd; : ????
What happened when you tested it? : then what does this do? (from parsing SDTIN) : : $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; Well, the left hand side of the s operator is a regular expression. This expression is looking for a percent sign (%) followed by an hex number, followed by another hex number. If a match is found, then the hex numbers are placed in $1. The right hand side of the s operator is a replacement string. It is normally interpolated (or treated as a double quoted string), except when the e modifier is included. In this case the e modifier executes the replacement or right hand side of the s operator. The result of the execution of the right hand side will replace the percent sign followed by a hex number followed by another hex number in $name. The g modifier will do this repeatedly. This is all explained in more detail in the file 'perlop' under the Quote and Quote-like Operators section. You can read about the pack() function in 'perlfunc'. : $name =~ tr/\0//d; ### replaces zero values to empty???? In this case \0 is equivalent to ASCII 0 or chr(0). The d modifier deletes matched, but unreplaced characters in $name. HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 Don't tread on my bandwidth. Trim your posts. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>