RE: silly unlink question..

2002-01-24 Thread Bob Showalter
> -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 23, 2002 2:48 PM > To: 'Jonathan E. Paton'; [EMAIL PROTECTED] > Subject: RE: silly unlink question.. > > > okay so this works: > > @files = ; &

RE: silly unlink question..

2002-01-24 Thread Nikola Janceski
opendir/readdir/closedir to do this, but I wanted to know why the second example doesn't work. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: Re: silly unlink question.. > But can some

RE: silly unlink question..

2002-01-23 Thread Jonathan E. Paton
> okay so this works: > > @files = ; > print "@files\n"; > is obviously not a filehandle, or a variable containing one. Hence it's a glob. > but this doesn't: > > $search = "/home/*/*.txt"; > @files = <$search>; > print "@files\n"; > <$search> is treated as a named filehandle, since that i

Re: silly unlink question..

2002-01-23 Thread Jonathan E. Paton
> But can someone explain the <*.bak>? how does that work > and what does it do? (and where is there a description > of it's use)? Thanx File glob. Returns an array of filenames which match the regex /*\.bak$/ - basically those that end in .bak This is a very Unix like feature of Perl, which

silly unlink question..

2002-01-23 Thread Nikola Janceski
in the man perlfunc page we see: unlink LIST unlink Deletes a list of files. Returns the number of files successfully deleted. $cnt = unlink 'a', 'b', 'c'; unlink @goners; unlink <*.bak>; Note: "unlink" wil