in reply to Re: File Manipulation
in thread File Manipulation

You need chomp to remove the newline from your password.

my $random_file = "/home/sites/site70/web/cgi-bin/i-merchant/admin/set +up/ric.txt"; open (FILE, $random_file) or die $!; my @LINES=<FILE>; close(FILE); my $OTP = splice @LINES, rand @LINES, 1; chomp $OTP; open (FILENEW, ">$random_file") or die $!; print FILENEW, @LINES; close (FILENEW); my $PPP = $OTP;

Also, if more than one process can access the file at the same time then you need to look at file locking.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg