[SLUG] simple perl script problem

From: aaron steimle (asteimle@washpat.com)
Date: Wed Mar 09 2005 - 16:03:14 EST


Can anyone tell me why this code will NOT work? I have look every where
and tried every combination of syntax I could find. This code is
basically a copy of every example I can find. I know there are other
ways to do this but I want to know why THIS isn't working.

==================================

#!/usr/bin/perl

opendir DIR, "/var/errors/";

while ( $filename = readdir(DIR) )
    {
   @fileinfo=stat($filename);
    $sizestat = $fileinfo[7];
    print "$filename - $sizestat\n";
    }
closedir DIR;
===================================
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:25:50 EDT