Help for this page

Select Code to Download


  1. or download this
    # Encrypt file.
    my $gpg_command = `gpg --trust-model always -er 12345678 my_file.txt`;
    ...
    
     open( my $out, ">", "encrypted.pgp" ) or die "Could not open file for
    + encrypted data - $!";
    
  2. or download this
    # Build encryption command
    my $gpg_command = "gpg --trust-model always -er 12345678 my_file.txt";
    ...
    # Save captured STDOUT to a file.
    open( my $out, ">", "encrypted.pgp" ) or die "Could not open file for 
    +encrypted data - $!";