Erik Witkop wrote:
There is one more task that I am unable to solve. If $_ was something like FYUY or fO76, I would like to remove the first ^[Ff].But keep the last 3 character. Find and Replace does not work obviously as I would lose those last 3 characters that I want. I researched the map functionality and I can't come up with the proper code. This doc is very good at explaining map. http://mailman.linuxchix.org/pipermail/courses/2003-November/001368.html But I don't see how I can still keep the last 3 characters. I tried thinking of it in different way. I tried to do something like: @map_results1 = map(/(^[^Ff]{3})/, @map_results1); Basically saying, if it starts with NOT F or f, then grab 3 characters. Well that didn't work at all. But I understand how map works, a little better from trying new things. Any help on how I can remove F or f and still keep the last 3 characters in $_?
s/^[fF](?=...)// for @map_results1; John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/