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 John Tel 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 eatr

  1. eatr

    loop for regex

    thanks
  2. eatr

    loop for regex

    Thanks Another issue. I've only been working on individual 'components' of files to this point. One of these files typically has 9 or 10 components, all (essentially) similarly structured. Say I have a starting and an end point for all the components (start, end) and all the data is between...
  3. eatr

    loop for regex

    Kevin I didn't explain the situation clearly enough, Sorry. When I say the array has a single element I mean that all of the data is in a single cell (all in cell zero). Your code does essentially the same thing. (size is 0; length is 1). What I need is for this data, broken by newline, to...
  4. eatr

    loop for regex

    Almost. This is an incredible savings for me as the following code allows me to just grab all these lines as they are (given that I know the number of columns, once I know the length of the array, I can then move each column to an individual array): $data_file = "retestfile.txt"; # Open the...
  5. eatr

    loop for regex

    That does the trick. Thanks
  6. eatr

    loop for regex

    I need to pull all that data. Trying to figure out how to correctly use /s to span newlines. Once I do, I'll be able to pull the first set of data and I'll be on my way. Help me out, Kevin The line before the 2 (the first row in the sample) ends with "Comments \n" so why doesn't the...
  7. eatr

    loop for regex

    I should've taken your advice earlier. Here's an abbreviated sample of the data I want to match --in this part of the file, it's multiple lines. I don't know before hand how many there are in each set until I parse the first set. The format of these sets is consistent, however. I've indicated...
  8. eatr

    loop for regex

    Kevin I appreciate your help. All I really need at this point is the precise syntax for setting a range (starting pattern to end pattern) from which I can then test and extract data and stop; be it a WHILE, FOR or IF loop. This is a file that will, for the most part, be consistent. I need to...
  9. eatr

    loop for regex

    I'm trying to parse a file that has similar data in different sections; thus I need to set limiting conditions or there will be overmatching. Problem is I can figure out the exact syntax. I've read a file into an array and am looping through each line of the array. I want to use a WHILE or...
  10. eatr

    GD::GRAPH ---show_values

    I've created a linespoints graph with the array values plotted as points in the graph. Now, the show_values option, if set, would also print the numeric values of those points on the graph (at those points). My question: is there any way I would be able to print values other than the original...
  11. eatr

    passing array to a function

    figured it out: I was pushing into an array reference, which the function will not accept
  12. eatr

    passing array to a function

    looking for help in passing an array to the GD::GRAPH function $graph->set_legend(@legend_keys); passing the array as shown returns pointers to memory addresses. for my $k ( 0 .. $#legends_keys) { # size $graph->set_legend (@{$legends_keys[$k]}); } returns ONLY the last value (at...
  13. eatr

    GD::Graph 2 ...UNDEFINED bug

    1)In the documentation, when discussing the array of data for the chart, it states that "If you don't have a value for a point in a certain dataset, you can use undef, and the point will be skipped." Well, in fact, the point is not skipped but rather reverts to the lowest possible value. Can...
  14. eatr

    moving through loop

    I realize that, that's why I've started with '0' in the heading. Here's what I want, more specifically: to loop through the array comparing 2 columns concurrently if I wanted to work with columns 1,3 first run through then columns 2,4 2nd run through, etc. how would I write the for loop...
  15. eatr

    moving through loop

    I want to be able to move through the columns of a dynamic (size varies --nothing constant) 2 dimensional array, making calculations and then changes to the values. The colums would be accessed as pairs. for example 0 1 2 3 4 5 6 7 ... a 123 000...

Part and Inventory Search

Back
Top