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 Chris Miller 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. jmg498

    Extracting data from columns in a textfile with headers...

    I should mention that I have the contents of the files stored in arrays. I just want to extract an entire column from each of the arrays.
  2. jmg498

    Extracting data from columns in a textfile with headers...

    I have a text file in the following format: HEADER1 HEADER2 COL1 COL2 COL3 COL4 COL5 With data in each column. What I'd like to do is extract, for example, all data in COL2 and COL4...and write those columns to another file. I also need to ignore the headers that appear before the data...
  3. jmg498

    Perl Split Function

    I'll give this a shot when I get back tonight. Thanks so much for your help, Travis! I greatly appreciate it. You da man.
  4. jmg498

    Perl Split Function

    That might be the problem. I need all lat/lon values to remain in tact, even if they're the same. That way when they're passed to another function that creates the shapefiles (for use in ArcGIS), it can pair the correct latitudes with the correct longitudes. I can work on that though through...
  5. jmg498

    Perl Split Function

    Thanks much, guys! That really helps. I seem to be losing the last longitude value in both methods, but that may be a consequence of my previous code. I'll have to look over things in more detail later. But it definitely gets me further than I was before. Thanks so much!
  6. jmg498

    Perl Split Function

    To clarify, I meant I want to store all latitudes in an array and all longitudes in an array. Not each. Sorry for the confusion.
  7. jmg498

    Perl Split Function

    The following script reads a file called warning.txt and extracts a string of latitude and longitude values from the file. The format of this string is: LAT1 LON1 LAT2 LON2 LAT3 LON3 up to a maximum of 20 LAT/LON pairs. I would like to split the string and store each latitude in its own array...
  8. jmg498

    Perl Regular Expressions

    Thanks! That helps a lot!
  9. jmg498

    Perl Regular Expressions

    I was thinking perhaps I could use a loop to store each value in an array, and then access the values by element. But I'd still need some help getting the right pattern.
  10. jmg498

    Perl Regular Expressions

    It's been 2 years since I've done any work with regex in Perl so I'm hoping someone can offer a suggestion. I'd like to save all values in a text file (that's stored in array) between two keywords: "LON" and "TIME", into variables. The problem is I'd like to save each value to its own variable...
  11. jmg498

    Passing Session Variables From One Script to Another

    Thanks! I actually just did that, although a little differently but the same concept. In the one script I used $location = $_GET['foo'] and in the other script I put "script.php?foo=.'$location.'"; I appreciate it!
  12. jmg498

    Passing Session Variables From One Script to Another

    The hosting service I am using does not permit the use of registering globals. But I need to pass a variable with a constant value to other scripts that are called. I've tried: <?php session_start(); $location = $_GET['location'] // Passed in from a webform. session_register("location")...
  13. jmg498

    Failed to Open Stream

    Well, it turns out that it was indeed the host. The site claimed they allowed fopen but it turns out last week they decided to disable it for outgoing connections from their server. I ended up getting it to work fine when I set it up locally. Thanks very much for your help! Hopefully they...
  14. jmg498

    Failed to Open Stream

    Well, the problem still exists even if I use http to access the file I need (the files are stored both on FTP and HTTP). I also verified fopen is set to true.
  15. jmg498

    Failed to Open Stream

    The free host I'm doing doesn't give me the option to SSH in. I'll give it a shot on my local machine and see what happens.
  16. jmg498

    Failed to Open Stream

    Thanks for your reply. Unfortunately it isn't set to false. Someone else running a similar script is also having problems which is making me think it might be some sort of issue with the file server I'm accessing. Hmmm...
  17. jmg498

    Failed to Open Stream

    I meant to add...all permissions are set 777.
  18. jmg498

    Failed to Open Stream

    All of a sudden I'm getting the following errors when trying to execute a script: Warning: fopen() [function.fopen]: connect() failed: Permission denied in /home/www/jmg498.freehostia.com/radar/crrdr.php on line 51 Warning...
  19. jmg498

    Arithmetic in PHP

    Nevermind, figured it out! <?php if($temp > "271.16") { $ratio = 12+2*(271.16-$temp); } $ratio = 12+(271.16-$temp); print "The snow to liquid ratio is $ratio"; ?> This thread can be deleted. Thanks!
  20. jmg498

    Arithmetic in PHP

    I'm not quite used to the syntax of performing arithmetic operations on variables in PHP. Below is my code. I think it's pretty obvious what I'm trying to do based on the code, but I just don't know how to format it correctly in PHP. Any help is GREATLY appreciated! :) $temp is a variable...

Part and Inventory Search

Back
Top