Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This produces the results I want but it's messy !my $newenckey = getcryptkey; open(INPF, ">$ENV{HOME}/.tmpass") or die "Can't write $ENV{HOM +E}/.tmpass: $!\n"; for my $rec_ref(@records) { print INPF "$rec_ref->[0] $rec_ref->[1] $rec_r +ef->[2]\n"; } close(INPF); open(INPF, "<$ENV{HOME}/.tmpass") or die "Can't write $ENV{HOM +E}/.tmpass: $!\n"; open(PASSF,">$ENV{HOME}/.perlpasswd") or die "Can't write $ENV +{HOME}/.perlpasswd: $!\n"; my $in; while( sysread(INPF,$in,length($newenckey)) ) { print PASSF $in^substr($newenckey,0,length($in)); } close(PASSF);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open file or pipe ?
by punch_card_don (Curate) on Nov 10, 2004 at 16:38 UTC | |
by Anonymous Monk on Nov 15, 2004 at 12:32 UTC | |
|
Re: open file or pipe ?
by ikegami (Patriarch) on Nov 10, 2004 at 17:28 UTC | |
|
Re: open file or pipe ?
by fglock (Vicar) on Nov 10, 2004 at 16:46 UTC | |
by Anonymous Monk on Nov 11, 2004 at 09:27 UTC |