try this..

foreach (@t) { print "$_<BR>"; };

On Thu, 2001-10-18 at 10:54, dan radom wrote:
> I'm trying to print the contents of a file which is being passed from a html form.  
>I'm pretty close (I think).  Here's what I have...
> 
> html form...
> 
> <form method=post action="/cgi-bin/smsconfview.pl">
> Enter the hostname to view the configuraqtion file
> <br>
> <input size=50 name="host">
> <br><br>
> <input type ="submit" value="submit">
> 
> 
> perl script...
> 
> #!/usr/local/bin/perl -w
> use CGI qw(:all);
> $s=CGI::param('host');
> $s = quotemeta($s);
> print header;
> print start_html();
> open(CONF, "/opt/disk4/REDBACK-BACKUP/$s") or die("configuration file not found")";
> @t=<CONF>;
> close(CONF);
> foreach (@t) { print "$_<BR>" };
> print end_html();
> 
> 
> Here are the errors...
> 
> String found where operator expected at /usr/local/apache/cgi-bin/smsconfview.pl 
>line 10, near "foreach (@t) { print ""
>   (Might be a runaway multi-line "" string starting on line 7)
>         (Missing semicolon on previous line?)
> syntax error at /usr/local/apache/cgi-bin/smsconfview.pl line 10, near "foreach (@t) 
>{ print ""
> In string, @t now must be written as \@t at /usr/local/apache/cgi-bin/smsconfview.pl 
>line 7, near ";
> @t"
> Scalar found where operator expected at /usr/local/apache/cgi-bin/smsconfview.pl 
>line 10, near "foreach (@t) { print "$_"
>         (Do you need to predeclare foreach?)
> Can't find string terminator '"' anywhere before EOF at 
>/usr/local/apache/cgi-bin/smsconfview.pl line 10.
> httpd: [Thu Oct 18 14:47:10 2001] [error] [client 155.251.65.70] Premature end of 
>script headers: /usr/local/apache/cgi-bin/smsconfview.pl
> 
> 
> 
> Any suggestions?
> 
> dan
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Richie Crews

Unix Administrator / Internet Integrator

Email: [EMAIL PROTECTED]

Cell: (706) 773 - 3436
Desk: (706) 634 - 3681
Fax: (706) 634 - 3831

"When I take action, I'm not going to fire
a $2 million missile at a $10 empty tent 
and hit a camel in the butt. It's going to
be decisive."   -  President George W. Bush


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to