use warnings; use strict; my $sep = $^O eq 'MSWin32'?';':':'; $ENV{'PATH'} .= $sep . "directory to be added";