N
Nene
Hi,
This script below stops and hangs after it fails to find the directory
in the following code:
chdir("/c\$/$stuff/") || die "cannot cd into /c\$/$stuff ($!)";
Here is the output it gets when it doesn't find the directory:
cannot cd into /c$/blah (No such file or directory) at ./start_blah.pl
line 12, <SCRATCHPAD> line 40.
But I don't want it to stop, I want it to proceed. How do I go about
getting that?
#!/usr/bin/perl -w
print "\n";
print "Starting .....\n";
open(SCRATCHPAD,"LOG.txt") or die "can't open $!";
my @uniq = <SCRATCHPAD>;
foreach my $stuff ( @uniq ) {
chomp($stuff);
chdir("/c\$/$stuff/") || die "cannot cd into /c\$/$stuff ($!)";
open(STARTUP, "/c\$/$stuff/startup |");
system('sleep 10');
}
close(STARTUP);
close(SCRATCHPAD);
This script below stops and hangs after it fails to find the directory
in the following code:
chdir("/c\$/$stuff/") || die "cannot cd into /c\$/$stuff ($!)";
Here is the output it gets when it doesn't find the directory:
cannot cd into /c$/blah (No such file or directory) at ./start_blah.pl
line 12, <SCRATCHPAD> line 40.
But I don't want it to stop, I want it to proceed. How do I go about
getting that?
#!/usr/bin/perl -w
print "\n";
print "Starting .....\n";
open(SCRATCHPAD,"LOG.txt") or die "can't open $!";
my @uniq = <SCRATCHPAD>;
foreach my $stuff ( @uniq ) {
chomp($stuff);
chdir("/c\$/$stuff/") || die "cannot cd into /c\$/$stuff ($!)";
open(STARTUP, "/c\$/$stuff/startup |");
system('sleep 10');
}
close(STARTUP);
close(SCRATCHPAD);