in reply to Having problem to substitute "'"

$path =~ s/'//g;
will remove all single quote characters from the string $path. Here is a contrived example:
use warnings; use strict; my $path = q('/abc/dead/apple'); print "$path\n"; $path =~ s/'//g; print "$path\n";

This prints out:

'/abc/dead/apple' /abc/dead/apple