It looks like there is a single space between each data value; if
so, you can split on whitespace rather than all the nasty pattern
matching; did this not work for you?
On Thu, 7 Jun 2001, Brent Buckalew wrote:
> Hello all,
>
> I tried putting the following into the program but it doesn't rea
Hello all,
I tried putting the following into the program but it doesn't read out the
necessary data just yet. I'm not sure why not. I've had to modify it to
the following so that it'll run and not complain to me. Here's what it
looks like now.
do {
$discard_line = ;
} until ($discard_line
Nope. It breaks down like this:
open (FILEHANDLE, "filename") opens for reading--can't be changed
open (FILEHANDLE, "filename") write to filename, writing over current
contents
open (FILEHANDLE, ">>filename") write to filename, appending to current
contents
Your changes will be sav
How about something like this?
# Get rid of all the lines up till the Nitrogen ones start:
do {
$discard_line = ;
} until ($line =~ /Log 10 Mean Ionisation/)
# Then, process lines until no more Nitrogens:
while () #Current line becomes the variable $_
{
break unless (/Nitrogen/); #if n
Now, does the Perl command below actually affect the ? I suspect
that it does and that's something that I can't do. The OUTFILE is
something that has to stay as is. Thanks for the suggestion. Let me know
if I'm wrong about that destruction of the OUTFILE.
Brent
>
> How about something like