Puregnome45 has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
So recently I have been tasked with writing a program that will accept user input and preform the system command sha1sum on each file in the array of user input. The output of sha1 needs to be redirected into a new file, but this is were my code is failing and I cannot, for the life for me, figure out why.
print "Input file names to be encrypted"; @files = <STDIN>; foreach $file (@files) { print "Preforming sha1 on $file"; system( "sha1sum $file > data" ); }
Any help on this would be tremendously appreciated.
P.S. Sorry of there is something wrong with my post, first time I've needed to ask my own question :p
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What is causing sha1 system call to fail to redirect?
by roboticus (Chancellor) on Jul 15, 2015 at 21:22 UTC | |
|
Re: What is causing sha1 system call to fail to redirect?
by toolic (Bishop) on Jul 15, 2015 at 20:29 UTC | |
by Puregnome45 (Initiate) on Jul 15, 2015 at 21:05 UTC | |
|
Re: What is causing sha1 system call to fail to redirect?
by marinersk (Priest) on Jul 16, 2015 at 03:37 UTC | |
|
Re: What is causing sha1 system call to fail to redirect?
by locked_user sundialsvc4 (Abbot) on Jul 15, 2015 at 20:47 UTC |