in reply to Remove substring

If I understand the question correctly, you use:
substr($string,0,2,"");
Which removes what you want, but also returns it, and not the remaining string. Instead, try using substr as a lvalue:
substr($string,0,2)="";

Replies are listed 'Best First'.
Re^2: Remove substring
by cees (Curate) on Jun 26, 2005 at 15:59 UTC

    Just to add to this answer, both of those solutions will alter the original string. If you do not want the original string to be altered, then make a copy first...