in reply to Strip filename

you are "escaping" / and \ (by using \/ \\) ... but what about ( ) $ ? ..... - they all have special meanings!
Try escaping them, too!
HTH Rata

Replies are listed 'Best First'.
Re^2: Strip filename
by kalyanrajsista (Scribe) on Dec 22, 2009 at 11:48 UTC
    Actual culprit is below line which is replacing some of the characters like 'l' or 'c' with null values. Is there any alternative for this...
    $ans =~ y/[[:space:][:cntrl:]]//d;
      Is there any alternative for this

      Yes:  $ans =~ s/[[:space:][:cntrl:]]//g;