Reading from a file in a script

zilore mumba zmumba at YAHOO.COM
Thu Oct 16 12:38:23 EDT 2008


Help sought please,
I have a file generate by a perl script, containing only the current date, written as, e.g.: 16/ 10/ 2008.
 
I am trying to read from this file in my grads script. Here is the script I wrote:
read(date_file.txt)
 
say sublin(result,2)
 
Day=sublin(result,2)
Month=sublin(result,3)
Year=sublin(result,4)
 
'draw title Valid on:  'Day' 'Month' 'Year
 
According to the Grads documentation, the first record of this read statement is a return error, and I can recover the records from 2 and repeatedly reading for subsequent records.
 
I do not get beyond the first line of my script, geeting error 1, which is an open error.
I have not seem a single script which reads from a file.
Does the read function actually work, or where is my error?
 
Assistance appreciated
Zilore Mumba



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20081016/c07359c4/attachment.html 


More information about the gradsusr mailing list