my $path-info = $ENV{PATH_INFO} my $path = "/home/usrs/rjoseph/images"; $path-info =~ s/^[^/]// # strip of preceeding noise $path-info =~ s#[^/\w\.]//g # strip out any non-word dot chars