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 bkrike 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 kb0rhe

  1. kb0rhe

    Compare HASH table with Array return new Array with changed Value

    FILE 1: BRG :262500: 3.55 #SPRING-GOVERNOR LINK # BRG :262501: 0.00 #Spring-Valve # BRG :262504: 4.60 #SPRING-GOVERNED IDLE # BRG :262505: 0.00 #SPRING, GOVERNOR # BRG :262506: 3.75 #SPRING-CAM RELEASE # BRG :262507: 0.00 #CRANKSHAFT # BRG :262514: 2.60 #LOCK-PISTON PIN # BRG :262515: 25.70...
  2. kb0rhe

    Compare HASH table with Array return new Array with changed Value

    Kevin, The main problem is this. I will try to explain: I have to change values in "FILE 2" based on what is found in "FILE 1" FILE 1 contains a part number and price. FILE 2 Needs to have the price updated based on what is found in file1. FILE 1 simplified (Might actually contain 10K lines)...
  3. kb0rhe

    Compare HASH table with Array return new Array with changed Value

    I get this error: Use of uninitialized value in join or string at C:\Program Files\LuckaSoft\EngInSite Perl Editor\Hash.pl line 17, <> line 4304. What is wrong.. please { local @ARGV = ('C:/CNTWork/items1.csv'); local $^I = '.bac'; while(<>) { chomp; my @array =...
  4. kb0rhe

    Compare HASH table with Array return new Array with changed Value

    Hey I have been working with Perl for a few weeks now.... The portion between the colon's ":" Is the part number. AYP :104757X421: :104757X421: Thanks for your response! I do appreciate it. I can't wait to try your code. -D
  5. kb0rhe

    Compare HASH table with Array return new Array with changed Value

    What I need to do is to export a CSV file (see "FILE2 Example") and change the price of that part e.g. "2.64" to "3.28. I have a list of 4000 parts that need to be compared with a file that might have 20K+ lines (New prices for parts). What I was trying to do is create a "Hash" of FILE1...
  6. kb0rhe

    Working with two files

    I know this doesn't help but I am interested in this same solution. I have X,PRTNO, X,X,X,123 In file 1 File two has PRTNO, 234 Where 234 is updating file 1. So a person should get X, PRTNO, X,X,X,234...
  7. kb0rhe

    Get Value between two points.

    Okay I am dumb I could use substr and count backwards. I will post my code. Douglas
  8. kb0rhe

    Get Value between two points.

    How do I get a value between two points on a line? "BRG CALIF. 2 STAR 0000 00000000" Point "A" is "BRG" point "B" is "0000" I want to see everything between the "G and 0" Less "G" and "0". So what should be returned " CALIF. 2 STAR " I can strip the spaces out myself...
  9. kb0rhe

    Check if Perl value is alpha or numeric

    I have a value and I want to know if it is a numeric value. There isn't anything to test a value if it is truly numeric. Nothing is jumping out at me. I have been looking online for a while. Douglas
  10. kb0rhe

    How do I keep the end of this line?

    Wow. Thank you very much for the excellent explaination! Douglas
  11. kb0rhe

    How do I keep the end of this line?

    Kevin Yes thanks works great. (I am just stupid in perl. No... wait... just started in perl.) Can you explain line 2 to me? I understand that you are setting $t = <Rightside of => I tried just doing: $r = [3]; print $r ; that prints out Array(0xXXXX) What's happening on that line?
  12. kb0rhe

    How do I keep the end of this line?

    What we need to understand is that the "Title" can be any length. So printing the array in the last response wont work. I need something that finds the lenght of the string and removes the leading portion of the text. e.g. "Z BRG 100023 GASOHOL TEST KIT". I know that "Z BRG 100023" array...
  13. kb0rhe

    How do I keep the end of this line?

    Sorry I left out a bunch of code and information. I actual split this line before I get to this point Where $line = Z BRG 100023 GASOHOL TEST KIT $line = $_; #Set value of $line $line =~ s/\s+/ /g; #Remove extra spaces @array1 = split(/ /...
  14. kb0rhe

    How do I keep the end of this line?

    This is what I have below. BRG 100023 GASOHOL TEST KIT This is what I want: GASOHOL TEST KIT I can extract the BRG and 100023 but I need the "Title" of the product now. @array("BRG 100023 GASOHOL TEST KIT"); print $array[1] . " " . $array[2]. " ". $array[3]; That would only get me BRG 100023...
  15. kb0rhe

    Combine two lines of text sequentally

    Below is a sample of the file I am importing. (FILE 1) SAMPLE FILE 2 is what I am asking for help on. SAMPLE FILE 2 is a representative of what I am asking for help on. FILE 1 has six lines of data I want three. Combine Line 1 with Line 2, Line 3 with Line 4, Line 5 with line 6. This file is...

Part and Inventory Search

Back
Top