# my $pid; # if (!defined($pid = fork)) { # warn "cannot fork: $!"; # return; # } elsif ($pid) { # warn "begat $pid"; # return; # I’m the parent # } # exec 'mozilla', '-url', "$url"; or use $pid = fork; exec 'mozilla', '-url', $url unless defined $pid; #### / ( .+? # match (non-greedy) anything ... [.!?] # ... followed by any one of !?. [")]? # ... and optionally " or ) ) (?= # with lookahead that it is followed by ... (?: # either ... \s+ # some whitespace ... ["(]? # maybe a " or ( ... [A-Z] # and capital letter | # or ... \s*$ # optional whitespace, followed by end of string ) ) /gx ; #### use Cwd; my $dir = getcwd; #find root of script print "Current Directory is $dir\n"; print "Appending skudb to dir\n"; $dir = $dir . "skudb"; if (-d $dir) { chdir $dir; #move into the new directory #do some stuff in $dir here } else { mkdir $dir } #### use Cwd 'chdir'; #That overrides chdir to update $ENV{PWD} my $dir = getcwd; #find root of script print "Current Directory is $dir\n"; print "Appending skudb to dir\n"; $dir = $dir . "skudb"; unless (-d $dir) { mkdir $dir } chdir $dir; #move into the new directory print $ENV{'PWD'}; #do some stuff in $dir here #### my ($sec2, $min2, $hour2) = localtime(time); print "Whole hours remaining until midnight: (24-$hour2)=";print 24-$hour2;print" hours\n"; print "Minutes remaining until next hour: (60-$min2)=";print 60-$min2;print" minutes\n"; if ($hour2>2) { $newdayhours = 24-$hour2+2; $min2=60-$min2; print "There are $newdayhours hour(s) and $min2 minute(s) until the new day."; } else { print "There are ";print 2-$hour2;print" hour(s) and ";print 60-$min2;print " minute(s) until the new day."; }