Bug#267792: perl code

Jonas Meurer Jonas Meurer <jonas@freesources.org>, 267792@bugs.debian.org
Wed, 1 Sep 2004 20:20:57 +0200


hello,

i finally translated the ruby script into perl, and here it is:

#!/usr/bin/perl -w
if (@ARGV == 2) {
  $file="/etc/exim4/passwd";
  open(PWD,">>$file") || die("Couldn't append to file '$file': $!");
  print PWD $ARGV[0] . ":" . crypt($ARGV[1], q{$1$.}) . "\n";
  close(PWD);
}
else {
  die ("Syntax: $0 username passwd \n");
}


bye
 jonas