in reply to What is causing sha1 system call to fail to redirect?
@files = <STDIN>;You don't show how you are running your code, but that line might be causing your code to appear to hang until you enter Ctrl-C, or some such. Also, you keep clobbering your output "data" file for each input file. Maybe you want something more like:
use warnings; use strict; for my $file (@ARGV) { print "Preforming sha1 on $file\n"; system( "sha1sum $file >> data" ); }
Run it like:
code.pl file1 file2 file3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is causing sha1 system call to fail to redirect?
by Puregnome45 (Initiate) on Jul 15, 2015 at 21:05 UTC |