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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>