I have a string $X='#SOME_STRING END';
I want to remove the begining '#' and ending 'END' but retain everything in between. This way works fine $X=~s/^#(.*?) END$/$1/; ##### $X is now SOME_STRING But this way does not s/^#(?=.*) END$//; ###### $X is still #SOME_STRING END Any pointers why the lookahead ?= is not working Thanks Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>