FW: Html within code

2007-07-25 Thread Johnson, Reginald \(GTI\)
> > Is coding this way wrong? By "this way" I mean where you don't use a > module to write html, but instead do it within the code by using print > "Content-type: text/html", "\n\n"; > > Example program > > #!/usr/bin/perl > > print "Content-type: text/html", "\n\n"; > > open (OMARFILE, " >

Re: FW: Html within code

2007-07-26 Thread Mr. Shawn H. Corey
Tom Phoenix wrote: On 7/25/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote: open (OMARFILE, " No matter what virtues your technique has or lacks, this particular line is surely broken; it will never die, even if the file can't be opened. Check the table of precedence in the perlop manpag

Re: FW: Html within code

2007-07-26 Thread Tom Phoenix
On 7/25/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote: open (OMARFILE, " No matter what virtues your technique has or lacks, this particular line is surely broken; it will never die, even if the file can't be opened. Check the table of precedence in the perlop manpage. Cheers! --Tom Ph

Re: FW: Html within code

2007-07-25 Thread Ovid
--- "Johnson, Reginald (GTI)" <[EMAIL PROTECTED]> wrote: > > > > Is coding this way wrong? By "this way" I mean where you don't use > a > > module to write html, but instead do it within the code by using > print > > "Content-type: text/html", "\n\n"; > > > > Example program > > > > #!/usr/bi

Re: FW: Html within code

2007-07-29 Thread Ken Foskey
On Thu, 2007-07-26 at 20:42 -0400, Mr. Shawn H. Corey wrote: > Tom Phoenix wrote: > > On 7/25/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote: > > > >> open (OMARFILE, "http://learn.perl.org/

Re: FW: Html within code

2007-07-29 Thread Rob Dixon
Ken Foskey wrote: On Thu, 2007-07-26 at 20:42 -0400, Mr. Shawn H. Corey wrote: Tom Phoenix wrote: On 7/25/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote: open (OMARFILE, " The brackets are in the wrong place. The other answers were just far to clever & cryptic. Hehe how true. W

Re: FW: Html within code

2007-07-29 Thread Mr. Shawn H. Corey
Rob Dixon wrote: What I recommend instead is open OMARFILE, 'junk' or die "Input file cannot be opened: $!"; The recommended usage of open is: open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: $!"; The three argument is preferred as a malicious user could enter a fil

Re: FW: Html within code

2007-07-29 Thread Rob Dixon
Mr. Shawn H. Corey wrote: Rob Dixon wrote: What I recommend instead is open OMARFILE, 'junk' or die "Input file cannot be opened: $!"; The recommended usage of open is: open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: $!"; The three argument is preferred as a m

Re: FW: Html within code

2007-07-30 Thread Jay Savage
On 7/29/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > The recommended usage of open is: > > open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: > $!"; > > The three argument is preferred as a malicious user could enter a file name > that starts with '>' It is preferr

Re: FW: Html within code

2007-07-30 Thread Mr. Shawn H. Corey
Jay Savage wrote: On 7/29/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: The recommended usage of open is: open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: $!"; The three argument is preferred as a malicious user could enter a file name that starts with '>' It i

Re: FW: Html within code

2007-07-30 Thread Rob Dixon
Mr. Shawn H. Corey wrote: Jay Savage wrote: On 7/29/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: The recommended usage of open is: open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: $!"; The three argument is preferred as a malicious user could enter a file nam

Re: FW: Html within code

2007-07-31 Thread Mr. Shawn H. Corey
Rob Dixon wrote: When someone is trying very hard to learn to write Perl that works at all, I think it is /not/ the time to regale him with the rigours of professional programming. Rob Programming is a rigorous discipline. Learning to do things right the first time around achieves two thing

Re: FW: Html within code

2007-08-01 Thread Jay Savage
On 7/31/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > > Programming is a rigorous discipline. Learning to do things right the first > time around achieves two things: > > 1. You don't have to unlearn bad habits before you learn the good ones. > > 2. Understanding the concepts behind the pr

Re: FW: Html within code

2007-08-01 Thread Rob Dixon
Mr. Shawn H. Corey wrote: Rob Dixon wrote: When someone is trying very hard to learn to write Perl that works at all, I think it is /not/ the time to regale him with the rigours of professional programming. Programming is a rigorous discipline. Learning to do things right the first time ar