in reply to mixing perl & shell style & speed
Nah. But quicky scripts have a way of escaping into the wild, where people become dependent on them and howl when they break. That's one reason to do more in Perl.
Consider changing my $key=`cat $file`; into
Doing it all in Perl protects against someone having a cat in an unexpected place in their PATH.open(K, "<$file") or die "$file: $!\n"; my $key = do { local $/; <K> }; close(K); chomp($key);
|
|---|