[Courses] [Perl] Part 8: The "s///" Operator

Rui Fernandes ruifernandes at tvtel.pt
Thu Nov 6 21:14:49 EST 2003


Dear Sir,

I've got a problem with a substitution in Perl. I have a string ( let's supose $word) that can have values like the followings - it's impredictable:

asd3$( .ophG

wordº çhtn mnfbgd 

@word_8 klMNBVFR 12

I want to extract only the character A to Z , a to z and 0 to 1 from the strings so I could have:

asd3ophG

word çhtn mnfbgd

word 8 kIMNBVFR 12


How can I do this if I don't know the number of letters in the string?
Please answer as soon as possible - It's very urgent.

Best regards,

Rui Fernandes


More information about the Courses mailing list