sub logfile{ my $file = "$gGui{complogpath}/$gGui{complog}.txt"; my @args = ("start",$file); for (@args) { s[ ( [\\/] ) ## A path delimiter ( [^\\/]* \s [\\/]* ) ## Two or more non delimiters ## including a space ( [\\/] ) ## Another delimiter ][$1"$2"$3]gx; ## Quote the path element }; system(@args) == 0 or warn "Couldn't launch '$file' : $!/$?/$^E"; }#logfile