in reply to Parsing e-mail and building HTML
That should be a basic outline for your code.# to read from the file open (FILE,"</myfile"); flock FILE,1; while (<FILE>){ ($tmp_state,$tmp_job) = split /\|/,$_; push @job, $tmp_job; } # sort @job or @state how you would like # Print html header foreach $tmp_job(@job){ # Print html with @job for a value and } # Print html footer
PS A good way to learn how to write a program is to write all the steps you need to do in comments. Then you can write the code that will do what you wrote in your comment.
#open file #lock file #read user input #write user input to file #close file #open file open (FILE,"</myfile"); #lock file flock FILE,2; #read user input $input = <STDIN>; #write user input to file print FILE "$input"; #close file close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Parsing e-mail and building HTML
by athomason (Curate) on Jul 06, 2000 at 00:38 UTC | |
|
RE: Re: Parsing e-mail and building HTML
by mrmick (Curate) on Jul 05, 2000 at 20:59 UTC | |
by rograndom (Initiate) on Jul 05, 2000 at 23:23 UTC | |
by mrmick (Curate) on Jul 06, 2000 at 04:05 UTC |