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...
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...
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...
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")...
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...
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...
Thanks to the user that suggested I use session variables. Unfortunately, I am having some trouble with those as well.
I currently have a webform where the user enters the location of where they want to view the weather information from. Then, I use POST in PHP like this:
post.php script...
Hi...
I'm rather new to PHP and have done most programming in Perl. I have a series of PHP scripts that display weather information for any area specified by a 3-letter code.
I am trying to figure out if there is a way I can modify the scripts so that when a user visits a website, they can...
It's been a while since I've programmed in Perl. I am having difficulty getting $station to go into the URL as shown below. Where am I going wrong? Thanks much!
---snippet---
print 'Enter the station ID: ';
chomp ($station = <STDIN>);
system ('wget...
I've written a MATLAB script that plots data based on ASCII data files that are written out by a program I wrote in Perl. But I have to keep copying and pasting the filename of the datafiles in order to have the MATLAB script call it.
I'm wondering if anyone knows of a way that I can call a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.