in reply to Move along, nothing to see here . . .
If you are really bent on doing a changed-assignment in one line, you can do it like this:
(my $parent_directory = $new_vhost_path) =~ s,^(.*)/(.*),$1,;
The issue is one of precedence, and the parentheses make the assignment happen first, and the replacement on $parent_directory second.
|
|---|