-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

I am having some problems with a script.  

Currently the script reads:
opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n";
@filenames = readdir (DIR) or die "Can't Hold Filenames \n";
foreach $name (@filenames) 
        {if ($name eq "blah.dat") {rename ($name, "blah.old") or die "sorry
couldnt complete task cause $!" } };

C:\scriptz>perl -w open4.pl
sorry
couldnt complete task cause No such file or directory at open4.pl line 7.


Yet when I run this code:

opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n";
@filenames = readdir (DIR) or die "Can't Hold Filenames \n";
foreach $name (@filenames) {
        print "$name \n"; }

I get:

C:\scriptz>perl -w open3.pl
.
..
blah.dat
FAD3.TXT
osctalk.log
sec_scan.html

Can anyone explain to me what I am doing wrong?

Thx again,
leon

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPn8PEEk2S2y0JhBMEQLtEACgvdYDCL97knE1QN7YQ1F1AM+FOhQAoN3E
N9WqX0J+zsHuuOPBcG1RNM6Z
=FV57
-----END PGP SIGNATURE-----
INDEPENDENCE COMMUNITY BANK CONFIDENTIALITY NOTICE: This message 
(and any attachment) is confidential and 
intended for the sole use of the individual or entity to which it is addressed. If you 
are 
not the intended recipient, you must not review, retransmit, convert to hard-copy, 
copy, use or disseminate this email or any of its attachments. If you received this 
email 
in error, please notify the sender immediately and delete it. This notice is 
automatically 
appended to all Internet email.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to