in reply to Re: can't write a variable to a file
in thread can't write a variable to a file
$savestr="$optionstr\n$total\n$countstr"; print $savestr; #save data back to file #save edited data back to file ####################save file sub Savetofile{ #open and read each line open(OUTFILE,">../kicks.txt")or die("Cannot open file"); flock(OUTFILE, LOCK_EX); print (OUTFILE "$savestr"); flock(OUTFILE, LOCK_UN)or die("Cannot unlock file"); close (OUTFILE) or die("Cannot close file"); }
Edited by Chady -- added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: can't write a variable to a file
by ysth (Canon) on May 11, 2004 at 10:28 UTC | |
by sabotodd (Initiate) on May 11, 2004 at 10:38 UTC | |
by ysth (Canon) on May 11, 2004 at 10:44 UTC | |
|
Re: Re: Re: can't write a variable to a file
by muntfish (Chaplain) on May 11, 2004 at 11:04 UTC |