next if (-s $file) == 0;

:)

-- 
William Sutton
M: 919.604.2502


On Mon, 31 Jul 2006, Mark Freeze wrote:

> Can anyone give me a tip on finding the size of a file with perl?
> 
> I am using the following method to parse through a list of files
> within a specific directory after using readdir.
> 
> foreach $listitem (@contents)
> {
>    ...do some stuff to each file...
> }
> 
> What I'd like to do is skip over any file that has a size of zero.
> 
> Thanks,
> Mark.
> 
-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/

Reply via email to