There is not much way beyond reading the complete file, making the changes and writing the file again, as the length of your lines will vary depending on the number of items actually ordered (each digit takes up one byte).
"installing" a Perl module simply means copying it onto the server in the right location or appending the file to your program. If you decide to keep Tie::File in a separate file from your program (much recommended), find a directory on your server under your control that is not readable from the web, note the path (let's assume it's /home/export/tom/)and make a subdirectory lib and then lib/Tie there. Put File.pm in the directory lib/Tie, and add to the top of your program :
That's it.use lib '/home/export/tom/lib'; use Tie::File;
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: Read/Write ASCII file
by Corion
in thread Read/Write ASCII file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |