Re: Still need unlink help!! God help me. - Revisited

2003-08-14 Thread perlwannabe
> This works - i've tried it... > > print 'Deleted ' , unlink (<*997*>) , ' files.\n'; > > good luck > Duncan Yes, it does. But it does not work when reading from a variable. my $temp = '*997*'; print 'Deleted ' , unlink (<$temp>) , ' files.\n'; This very simple variation of your example does n

Re: Still need unlink help!! God help me. - Revisited

2003-08-14 Thread david
"Perlwannabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > This works - i've tried it... > > > > print 'Deleted ' , unlink (<*997*>) , ' files.\n'; > > > > good luck > > Duncan > > Yes, it does. But it does not work when reading from a variable. > > my $temp = '*997*'; > print '

Re: Still need unlink help!! God help me.

2003-08-14 Thread david
"Perlwannabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > >> > >> The directory c:/testdir/ contains many files, but I want to delete > >> the files with any *item###*.* from the directory. So if the > >> directory has 3000 files I want to delete every file that has item997 >

Re: Still need unlink help!! God help me. - Revisited

2003-08-14 Thread Peter Scott
Use the glob() function instead of <> for file globbing. Then you won't have to worry about situations like the one you accidentally fell into. -- Peter Scott http://www.perldebugged.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Still need unlink help!! God help me.

2003-08-14 Thread perlwannabe
>> >> The directory c:/testdir/ contains many files, but I want to delete >> the files with any *item###*.* from the directory. So if the >> directory has 3000 files I want to delete every file that has item997 >> in it. >> > > glob returns the relative path of the files so if you are in a > diff

Still need unlink help!! God help me.

2003-08-14 Thread perlwannabe
Still having problem with unlink. My original problem began with deleting files from a list. I seem to have fixed the problem reading the list but the unlink does not work. Here is the test script that I am working from: my $file = 'listitems.txt'; open my $fh, $file or die "Cannot open $file:

Re: Still need unlink help!! God help me.

2003-08-14 Thread perlwannabe
> On Fri, 8 Aug 2003 22:16:38 -0400 (EDT), perlwannabe wrote: >> I tried both the suggested methods without success. But, I mightuv >> found a problem. I tried all of these methods with no success and >> looked at the input file "listitems.txt" and found something >> interesting when using a hexed

Re: Still need unlink help!! God help me.

2003-08-14 Thread david
Perlwannabe wrote: > Still having problem with unlink. My original problem began with deleting > files from a list. I seem to have fixed the problem reading the list but > the unlink does not work. > > Here is the test script that I am working from: > > my $file = 'listitems.txt'; > open my $f

Re: Still need unlink help!! God help me. - Revisited

2003-08-14 Thread perlwannabe
In my zeal for making things simple I may have created a problem. OK, here is the lowdown: the real file names I am trying to delete from the directory are rather lengthy and complicated and look like: partial_qn_ri_pub_default_asp__Online_qdisp_bn_03042997-0-0 partial_qn_ri_pub_default_asp__Onl

Re: Still need unlink help!! God help me.

2003-08-14 Thread Oliver Schnarchendorf
On Fri, 8 Aug 2003 22:16:38 -0400 (EDT), perlwannabe wrote: > I tried both the suggested methods without success. But, I mightuv found a > problem. I tried all of these methods with no success and looked at the > input file "listitems.txt" and found something interesting when using a > hexeditor.

Re: Still need unlink help!! God help me. - Revisited

2003-08-11 Thread Dave Arnold
In article <[EMAIL PROTECTED]>, perlwannabe <[EMAIL PROTECTED]> wrote: [Snip] > partial_qn_ri_pub_default_asp__Online_qdisp_bn_03042997-0-0 > partial_qn_ri_pub_default_asp__Online_qdisp_bn_03042995-0-0 > partial_qn_ri_pub_default_asp__Online_qdisp_bn_03042882-0-0 [Snip] > So I tried to use the u

Still need unlink help!! God help me. - THANK YOU!!

2003-08-11 Thread perlwannabe
To all of you who helped me with my unlink problem...THANK YOU!!! I finally figured out that the problem was the input file. There was an extended ASCII character at the beginning of the file that could not be seen until I looked at it with a hex editor. I am learning the hard way. But now the

Re: Still need unlink help!! God help me.

2003-08-11 Thread Bob X
"Perlwannabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Still having problem with unlink. My original problem began with deleting > files from a list. I seem to have fixed the problem reading the list but > the unlink does not work. > > Here is the test script that I am workin

Re: Still need unlink help!! God help me.

2003-08-09 Thread Kates Gasis
. - Original Message - From: "perlwannabe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 08, 2003 7:16 PM Subject: Re: Still need unlink help!! God help me. > > >> > >> The directory c:/testdir/ contains many files, but I want to delet

Re: Still need unlink help!! God help me.

2003-08-09 Thread Oliver Schnarchendorf
On Sat, 9 Aug 2003 00:22:09 -0400 (EDT), perlwannabe wrote: > I did indeed comment every single > variable, but deleted it from my sample script for simplicity. I have > been wrestling with this problem for a while. I did run your code and got > the following error: > > C:\testdir>perl testfile.