On Aug 7, 10:06 am, [EMAIL PROTECTED] (Starr Corbin) wrote: > Hello, I have written a Perl script that creates the dhcpd.conf and / > etc/hosts file for Red Hat Linux. The data is derived from a single > text file. What is stumping me is how to insert an automatic text > line for just the /etc/hosts part of my script that would > automatically insert a text line at the top of the /etc/hosts file > each time the script is run. > > For instance, I want to make sure that at the top of my /etc/hosts > file it reads: > 127.0.0.0 localhost.localhostdomain localhost > > I have tried using "push" and "print", but have not made it work. How > can I get my 127.0.0.0 to appear at the top of my /etc/hosts/ file > every time I run the script to create it?
I don't understand your question. You're saying you have a script that creates this file. So... create the file the way you want it. Wherever you're first putting data into the file, modify your script at some point previous to that so that it prints the 127.0.0.1 first. What's the real issue here? Please post a short-but-complete script that demonstrates the issue you're having. Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/