in reply to Re: Inserting lines in a file with Tie::File if lines don't exist
in thread Inserting lines in a file with Tie::File if lines don't exist

Could you copy and paste thet actual line of code? Because currently, it looks just peachy.


Who is Kayser Söze?
Code is (almost) always untested.
  • Comment on Re: Re: Inserting lines in a file with Tie::File if lines don't exist

Replies are listed 'Best First'.
Re: Re: Re: Inserting lines in a file with Tie::File if lines don't exist
by devgoddess (Acolyte) on Jan 04, 2004 at 01:35 UTC
    Sure thing.

    tie @lines, 'Tie::File', $hostsfile or die ...;

    Dev Goddess
    Developer / Analyst / Criminal Mastermind

    "Size doesn't matter. It's all about speed and performance."

      If you really have tie @lines, 'Tie::File', $hostsfile or die ...; then you should change it to something like

      tie @lines, 'Tie::File', $hostsfile or die "Couldn't tie file $hostsfile; $!";

      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Hooray!

        It worked! It worked! WAHOO!!!! :D

        Thanks!

        Dev Goddess
        Developer / Analyst / Criminal Mastermind

        "Size doesn't matter. It's all about speed and performance."