Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by unclescrooge

  1. unclescrooge

    read certain lines in a file

    Hi If you look at my code where I did the second loop to print certain lines. That works great but now my text file is open how do I re-write or safe the changes into the text file as print OUTPUT .. is not working
  2. unclescrooge

    read certain lines in a file

    Thanks so much it worked great
  3. unclescrooge

    read certain lines in a file

    Hi My code is as follows: open OUTPUT,">text.txt"; for (@list) { print OUTPUT ( (split)[3, 8], "\n") } close OUTPUT; open INPUT,"<text.txt"; @list=<INPUT>; close INPUT; print "Every second line is:\n"; for ($list = 0, $list < @list, $list+=2) { print "@list[$list]\n"; }
  4. unclescrooge

    read certain lines in a file

    Hi I need some help, I have created a file with a perl script with contents in it how do I print each and every second line out of the file? Thanks

Part and Inventory Search

Back
Top