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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. martinjburgess

    Reading a file

    Hi, Thanks for your reply, now have it sorted.
  2. martinjburgess

    Reading a file

    Hi, I would like to open and read a file that is in this format: Time|Username|Email|IP for example: 1345289299|Test|stinesofe@changesmile.org.ua|82.45.104.76 After reading a form input that includes $username and $ip, if the Email or IP are not listed in the file, then I would like to add...
  3. martinjburgess

    Newbie Question

    Sorry it's late but just want to say thanks to feherke for his patience and knowledge. Everything I wanted to achieve I have. Thank You
  4. martinjburgess

    Newbie Question

    That's done the trick, I'll do some more testing and let you know. Thank you, much appreciated.
  5. martinjburgess

    Newbie Question

    That last code completely mucks up the table layout of my test forum for some reason. These dat files are only small, never seen one larger than 1Kb
  6. martinjburgess

    Newbie Question

    That's correct, if sn's value is administrator then leave the siteurl and sitename intact.
  7. martinjburgess

    Newbie Question

    One last question. Is it possible to skip if the user is administrator? This is the line in the .dat file sn = |Administrator| Cheers
  8. martinjburgess

    Newbie Question

    You are a genius Sir, thank you very much, all working like a charm.
  9. martinjburgess

    Newbie Question

    start dat editing directory is ./Members files to process are ./Members/1.dat./Members/2.dat./Members/3.dat./Members/4.dat start file ./Members/1.dat write temp file /tmp/08yw9L8QjX rename file /tmp/08yw9L8QjX to ./Members/1.dat 0rename error Invalid cross-device link end file ./Members/1.dat...
  10. martinjburgess

    Newbie Question

    My mistake, it's not deleting any of the lines, it just reorderd them. Here's what I now get: start dat editing directory is ./Members files to process are ./Members/1.dat./Members/2.dat./Members/3.dat./Members/4.dat./Members/5.dat start file ./Members/1.dat write temp file /tmp/nKijKk93AQ...
  11. martinjburgess

    Newbie Question

    Thanks, almost there. It is now removing the line sitename but not the line siteurl There are full write permissions on the folder.
  12. martinjburgess

    Newbie Question

    It looks like it is functioning but it doesn't actually delete the lines siteurl and sitename. start dat editing directory is ./Members files to process are ./Members/1.dat./Members/2.dat./Members/3.dat./Members/4.dat./Members/5.dat start file ./Members/1.dat write temp file /tmp/WFTaSsK1ga...
  13. martinjburgess

    Newbie Question

    Thanks for your patience. This is the code and nothing happens: #!/usr/bin/perl use CGI::Carp fatalsToBrowser; # Global information: $theblahver = 16; $version = $versioncr = '10.3.6'; # Said Version; Copyright version $blanktarget = " target='_new'"; # Uncomment this for better time...
  14. martinjburgess

    Newbie Question

    Sorry but no joy. I did change this: foreach $file (<*.dat>) { to this: foreach $file (<$members/*.dat>) { as this is the folder the .dat files are in.
  15. martinjburgess

    Newbie Question

    I pasted it at the top of another script and when run it just gives a HTTP 500 error. I think I will need something more on the lines of: open(FILE,"$members/$_.dat"); while(<FILE>) { code code code close(FILE); } or something along those lines. Sorry for being so vague.
  16. martinjburgess

    Newbie Question

    Thanks for the reply but that just gives a 500 error What I need is a small script that when run will: open each .dat file in the Members folder Read each line If siteurl or sitename exists either delete the line or set it to ''
  17. martinjburgess

    Newbie Question

    Hi, I have a folder with a list of files - 1.dat, 2.dat, 3.dat etc The file structure is: rndsid = |11026|1342296563| lastactive = |1342296563| lastvisit = |1340862364| sitename = |Free PC Help| email = |admin@mysite.com| pmpopup = |1| lastpost = |1340736611| password = |******| posts = |2|...
  18. martinjburgess

    Help with file appending

    Thank you so much, all working now.
  19. martinjburgess

    Help with file appending

    Thank you for being so prompt. Can I explain that $messid is a message id and changes with each message. The variable must be similar on this forum it is probably $qid, in the address bar it says qid=1685298 for this post. The file $username.temp is not being created when a member accesses the...
  20. martinjburgess

    Help with file appending

    Thanks for the reply I am a novice at perl programming that is why I am here seeking help, my attempt is more than likely useless. The file I am reading is called $username.term and has this layout: 1339142221 1339142970 1339143224 etc I wish to read from the top of the file and see if any of...

Part and Inventory Search

Back
Top