[KLUG Members] perl syntax help

Dirk H Bartley members@kalamazoolinux.org
Mon, 08 Apr 2002 11:49:03 -0400


My Perl in a nutshell book tells me everythin I want to know but the syntax.

-z operator to determine if size is zero.
-s will return the file size.

No examples are shown.  I tried a couple of ways like

if( -z /home/dbartley/file ){ do stuff here }

$var = -s /home/dbartley/file;

but it always errors out.  Anyone familiar with this.

Dirk