Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here's a snippet of the code I currently use to put the unencrypted contents into an array.serv login pass serv login pass serv login pass
The problem is that each element of the array does not finish on a delimiter boundary.open(IN, $ARGV[2]) or die "Can't read $ARGV[2]: $!\n"; my ($in,@workarray); while( sysread(IN,$in,length($enckey)) ) { push @workarray,$in^substr($enckey,0,length($in)); }
gives meprint "Value is : $workarray[0]"; print "Value is : $workarray[1]"; print "Value is : $workarray[2]"; print "Value is : $workarray[3]"; print "Value is : $workarray[4]"; print "Value is : $workarray[5]";
When I was expectingValue is : SYB_SERV_DEV Value is : joe_blogg Value is : s nopasswor Value is : d SYB_SERV Value is : C_OTC joe_ Value is : bloggs nopa
hence searching elements of the array is proving fruitless.Value is : SYB_SERV_DEV Value is : joe_bloggs Value is : nopassword Value is : SYB_SERVC_OTC Value is : joe_bloggs Value is : nopassword
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Manipulating an encrypted file
by tachyon (Chancellor) on Oct 28, 2004 at 09:55 UTC | |
by Anonymous Monk on Oct 28, 2004 at 10:56 UTC | |
|
Re: Manipulating an encrypted file
by si_lence (Deacon) on Oct 28, 2004 at 09:48 UTC | |
|
Re: Manipulating an encrypted file
by claree0 (Hermit) on Oct 28, 2004 at 09:39 UTC | |
|
Re: Manipulating an encrypted file
by Random_Walk (Prior) on Oct 28, 2004 at 10:32 UTC |