From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
> Or weren't.
>>> So its working now then?
What changed? <<<
Changes to the file system wrought in the shell are not visible to the
calling Perl program until the shell's file handle is closed or
otherwise reset. Simply had to close() the file h
Then that would be the code to show :) although I bet
strict/warnings/and checking your open's (or die $!;) will show you what
is wrong :) <<<
I see, however that is still the best practice to be in, especially when
asking for assistance since it catches 99.9% of little issues.
No, the .
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
> # Execute a command that backs up every file in the directory # with a
> .bak extension.
>>> Um, ok so you're wondering why there are no .bak files?
Then that would be the code to show :) although I bet
strict/warnings/and checking your open's
Excellent points, all
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
>>> And a reason why using a shell command to copy a file is a bad idea.
<<<
Well, the 'shell' and 'copy' association in this case is actually
something of a red herring. The point of this particular script is not
to copy fi
Daniel Kurtz wrote:
Sorry, obviously the code is supposed to read:
Actually it should read:
use strict;
use warnings;
opendir( DIR1, ".");
opendir DIR1, '.' or die "Could not open .: $!";
@before = readdir(DIR1);
my @before = readdir DIR1;
closedir(DIR1);
# Execute a command that
Daniel Kurtz wrote:
> From: Daniel Kurtz [mailto:[EMAIL PROTECTED]
>
Why does @after end up looking exactly like @before? Is there some
>
> buffering going on here? And if so, how do I clear it? <<<
>
> Never mind, I figured it out. The file copying operation is another
> shell operation (c
From: Daniel Kurtz [mailto:[EMAIL PROTECTED]
>>> Why does @after end up looking exactly like @before? Is there some
buffering going on here? And if so, how do I clear it? <<<
Never mind, I figured it out. The file copying operation is another
shell operation (c'mon, I'm a newby, and I've only rea
Sorry, obviously the code is supposed to read:
opendir( DIR1, ".");
@before = readdir(DIR1);
closedir(DIR1);
# Execute a command that backs up every file in the directory
# with a .bak extension.
opendir( DIR2, ".");
@after = readdir(DIR2);
closedir(DIR2);
It still doesn't work.
daniel
--
To