From: Bek O. <gos...@te...> - 2001-07-17 04:56:09
|
jca...@we... wrote: > Bek Oberin <gos...@te...> wrote .. > > Is the stuf in web-lib.pl for Webmin .86 properly documented > > anywhere? > > I've been hired to write a module, never having written one > > before, and I'm getting there slowly but it's confusing me. > Have a look at http://www.webmin.com/webmin/modules.html > All the functions are documented in there .. Thanks, that's what I needed. > > Is there, for example, a standard function to add or remove > > a line from a specificied place in a file? Seems like that > > would be handy. > The best way to do this is with the &read_file_lines and > &flush_file_lines functions. For example, to insert a line you > could do : > $lines = &read_file_lines("/tmp/somefile.txt"); > splice(@$line, 10, 0, "hello world"); > &flush_file_lines(); Beaaaaauty! As the Aussies say :) That's what I needed. I'll head over to the devel list just as soon as I find the address for it. bekj -- : Usual state: (e) None of the above. : gos...@te... http://www.tertius.net.au/~gossamer/ : It is only too easy to compel a sensitive human being to feel : guilty about anything. -- Morton Irving Seiden |