coolsaurabh has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, Saurabhuse strict; use warnings; use CGI qw(:all); my $cgi = new CGI; my $this_url = $cgi->url(); #Save this script's url my $first = $cgi->param('first_name'); my $last = $cgi->param('last_name'); my $file = $first . '_' . $last . '.csv'; open(DF,'<',$file); foreach my $line(<DF>) { print $line; } close(DF); print "Content-type:text/html\n\n"; print <<EndOfHTML; <html><head><title>Generating Self-Referential URLs</title></head> <bo +dy> <FORM action="Maintenance_Data.cgi" method="POST"> Circle: <input type="text" name="first_name"> <br> Technology: <input type="text" name="last_name"> <input type="submit" +value="Submit"> </FORM> <p>The name you entered was '$first $last'</p +> <p>The name you entered was '$file'</p> </body> EndOfHTML
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need to print file contents on page (updated)
by haukex (Archbishop) on Jul 02, 2019 at 10:32 UTC | |
by holli (Abbot) on Jul 02, 2019 at 10:50 UTC | |
by marto (Cardinal) on Jul 02, 2019 at 11:59 UTC | |
|
Re: Need to print file contents on page
by roboticus (Chancellor) on Jul 02, 2019 at 11:56 UTC | |
|
Re: Need to print file contents on page (cgi101)
by Anonymous Monk on Jul 04, 2019 at 03:48 UTC | |
|
Re: Need to print file contents on page
by NetWallah (Canon) on Jul 03, 2019 at 05:38 UTC | |
|
Re: Need to print file contents on page
by AnomalousMonk (Archbishop) on Jul 03, 2019 at 05:34 UTC |