wipking has asked for the wisdom of the Perl Monks concerning the following question:
$random_file = "/home/sites/site70/web/cgi-bin/i-merchant/admin/setup/ +ric.txt"; open (FILE, $random_file); @LINES=<FILE>; close(FILE); srand; $OTP = "$LINES[(int rand@LINES)]"; $PWFILE = $OTP; open (FILENEW, ">$random_file"); foreach $LINES (@LINES) { if ($PWFILE eq $LINES){ $LINES = "" } else { print FILENEW $LINES; } } close (FILENEW); $PPP = $OTP;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Wipking
by rdfield (Priest) on Sep 26, 2002 at 13:25 UTC | |
by jmcnamara (Monsignor) on Sep 26, 2002 at 14:04 UTC | |
|
Re: Wipking
by Helter (Chaplain) on Sep 26, 2002 at 13:31 UTC | |
|
Re: File Manipulation
by wipking (Initiate) on Sep 26, 2002 at 13:39 UTC | |
by davorg (Chancellor) on Sep 26, 2002 at 13:53 UTC | |
by helgi (Hermit) on Sep 26, 2002 at 13:47 UTC | |
by Helter (Chaplain) on Sep 26, 2002 at 13:56 UTC |