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/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 the keyword "do" just after the second "&&". Perl's parser seems to be confused about what the curly braces mean. It is trying to compile an anonymous array constructor, instead of a code block. The parser only expects code blocks at some places in the program, and the middle of an expression isn't one of them. Also, from the look of your code, you may be close to reinventing File::Find, or some similar module. Hope this helps! --Tom Phoenix Stonehenge Perl Training ============================================================================================================================ Tech Mahindra, formerly Mahindra-British Telecom. Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra. ============================================================================================================================ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>