sub createPath { my $path = shift; my $response = 'n'; if ($xp->exists($path)) { print "Path already exists, overwrite element (N/Y): "; $response = ; chomp($response); } print $response, "\n"; unless (lc($response) eq 'y') { print "Path creation call will be ignored\n"; return 0; } print "Creating node..."; }