Re: Help in && control statement

2006-07-29 Thread Dr.Ruud
Andreas Puerzer schreef: > Anoop Kurup schrieb: >> 20 sub func() > > remove the empty > prototype or there will be no @_ ! Aaargh, good catch. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help in && control statement

2006-07-29 Thread Andreas Puerzer
Anoop Kurup schrieb: > Hi, > > > Can somebody explain to me what is the syntax error in the following > code: > > > 20 sub func() > 21 { > 22 my ($retension_period, $file_list) = @_; > 23 my $file; > 24 > 25 while(defined($file = glob("$file_list"))) > 26

Re: Help in && control statement

2006-07-28 Thread Rob Dixon
Anoop Kurup wrote: > > Can somebody explain to me what is the syntax error in the following > code: > > > 20 sub func() > 21 { > 22 my ($retension_period, $file_list) = @_; > 23 my $file; > 24 > 25 while(defined($file = glob("$file_list"))) > 26 { >

Re: Help in && control statement

2006-07-28 Thread Dr.Ruud
"Anoop Kurup" schreef: > while(defined($file = glob("$file_list"))) while ( defined($file = glob $file_list) ) > -s $file && -M $file > $retension_period && { print... ;} -s $file and -M $file > $retension_period and print... ; -- Affijn, Ruud "Gewoon is een tijger." -- To unsu

RE: Help in && control statement

2006-07-28 Thread Anoop Kurup
Hi Tom, Yes that worked. Thanks a lot. Cheers, Anoop -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Friday, July 28, 2006 8:26 PM To: Anoop Kurup Cc: beginners@perl.org Subject: Re: Help in && control statement On 7/28/0

Re: Help in && control statement

2006-07-28 Thread Tom Phoenix
On 7/28/06, Anoop Kurup <[EMAIL PROTECTED]> wrote: 27-s $file && -M $file > $retension_period && { print "File name is: $file\n"; print "File found\n"; } That expression should probably be written out as an if-block for clarity. But I think you'll fix the syntax error if you add th