![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Re: Re: Range of chars except oneby Anonymous Monk |
on Jan 21, 2002 at 08:47 UTC ( #140311=note: print w/replies, xml ) | Need Help?? |
True i thought about tr/// too...
but "a range of chars except one", could also be read "a range of chars PLUS one" (i like to reverse things up). tr/// also offer a complement modifier to it. So when i need to delete chars, it seems more simple to write the one i actually want to keep, preventing me to forget some: $_ = "123,Let's keep letters!\nAnd new lines..." tr/A-Za-z \n//cd; print;will print: Lets keep letters And new lines Creating that range could be easier... It's just my two cents. Freddo
In Section
Seekers of Perl Wisdom
|
|