heezy has asked for the wisdom of the Perl Monks concerning the following question:
I want to use the Unix command ckSum to generate a simple checksum for a file and store this for use in my program.
The system command returns success/failure {wait()} of whatever it executes but I want to get at the value...
$chkSum = system("cksum $file");
...the above returns either 0 or 256 depending on success/failure.
I think this is quite a basic thing to achieve but I'm lost.
Thanks
Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Capturing Results Of A System Command
by Chmrr (Vicar) on Sep 23, 2002 at 22:46 UTC | |
|
Re: Capturing Results Of A System Command (use a digest function)
by grinder (Bishop) on Sep 24, 2002 at 07:49 UTC |