Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking file size

Status
Not open for further replies.
Nov 28, 2002
121
US
I'd like to know how we check a file size in a perl script.

I want to check if a file is less than 120 bytes.

If it is more, I'll continue to process. If not, I'll exit.
 
The stat function returns an array who's seventh element is the filesize in bytes.

See
Yours, "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top