User Control Panel
Advertisements
HELP US, HELP YOU!
Author
Message
Scott Member Joined: 29 Nov 2003Posts: 134
Posted: Mon Dec 15, 2003 4:59 am Post subject:
i need help with my notes command can someone please assist me heres my code Code: elsif($msg =~ /^\#view notes/)<br /> {<br /> open (DATA, ">>notes/$victim.txt");<br /> $self->sendmsg(DATA);<br /> close(DATA); <br /> }
put when i type notes it says Quote: HelplessBot says: DATA
Back to top
Keenie Almost An Agent Joined: 31 Oct 2003Posts: 1071
Posted: Mon Dec 15, 2003 5:31 am Post subject:
well after you open the file you need the read it into a variable so either $line = ; or @lines = ; depending on if the file is one or more lines
Back to top
Nate God Like Joined: 12 Nov 2003Posts: 553
Posted: Mon Dec 15, 2003 1:58 pm Post subject:
And also, the ">>" at the beginning of the file path means "append to" which should usually be used to add text to the end of the file. You should be able to just do this: Code: open (DATA, "notes/$victim.txt");
Back to top