From joel at cts.com Thu Oct 14 23:15:20 1999 From: joel at cts.com (Joel Fentin) Date: Thu Aug 5 00:21:02 2004 Subject: What I learned at the meeting last night. (2) Message-ID: <3.0.4.32.19991014211520.007c8b30@cts.com> ~sdpm~ In other languages, I can place a beep in the code to see if program execution passed through a specific area of the code. This does not work with the following example. I was told to use warn "something"; & print STDERR __line__; . I don't seem to be able to use them to advantage. In the following program I wish to learn how to use them to see if execution flow passed through CCC. #!/perl/bin/perl -w use CGI::Carp qw(carpout fatalsToBrowser); # sends errors to browzer use strict; use CGI qw(:standard); #main part of the program AAA(); BBB(); CCC(); #end of main part of program #========================================================= sub AAA() {print "\07";} # beeps don't work #========================================================= sub BBB(){ print header(), start_html("1"); # program won't work w/o this line print end_html(); # program won't work w/o this line } #========================================================= sub CCC() { warn "something"; #? #print STDERR __line__; #? } -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 email: joel@cts.com web: http://efm.simplenet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From joel at cts.com Thu Oct 14 23:24:07 1999 From: joel at cts.com (Joel Fentin) Date: Thu Aug 5 00:21:02 2004 Subject: What I learned at the meeting last night. (1) Message-ID: <3.0.4.32.19991014212407.007c8d40@cts.com> ~sdpm~ I learned about =begin and =end. Everywhere I use them, I ruin the program. Here is an example program. My experience is these can be placed anywhere in the program to ruin it. This program works when they are gone. #!/perl/bin/perl -w #SimpleForm.cgi use CGI::Carp qw(carpout fatalsToBrowser); # sends errors to browzer use strict; use CGI qw(:standard); =begin comment text =end comment text print header(), start_html("1"); print h1("11"); print hr(), start_form(); print p(submit("111")); print end_form(), hr(); print end_html(); -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 email: joel@cts.com web: http://efm.simplenet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From joel at cts.com Thu Oct 14 23:16:42 1999 From: joel at cts.com (Joel Fentin) Date: Thu Aug 5 00:21:02 2004 Subject: A quick question Message-ID: <3.0.4.32.19991014211642.007c88b0@cts.com> ~sdpm~ The first program works. The second doesn't. What does it want? #use strict; $A = 3; print $A; use strict; $A = 3; print $A; -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 email: joel@cts.com web: http://efm.simplenet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From astewart at spawar.navy.mil Fri Oct 15 11:13:32 1999 From: astewart at spawar.navy.mil (Alan Stewart) Date: Thu Aug 5 00:21:02 2004 Subject: A quick question In-Reply-To: <3.0.4.32.19991014211642.007c88b0@cts.com> Message-ID: <199910151512.IAA02882@droid.nosc.mil> ~sdpm~ On 14 Oct 99 at 21:16, Joel Fentin wrote: >~sdpm~ >The first program works. The second doesn't. What does it want? > > >#use strict; >$A = 3; >print $A; > > > >use strict; >$A = 3; >print $A; my $A = 3; or use vars qw($A); The first limits the scope of $A to that block or file, the second makes $A global. Strict wants you to explicitly state what scope each variable gets, the assumption being, if you say it out loud, you will make fewer mistakes and it can do more checking. > >-- >Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 > --------------------------------------------------------------- Alan Stewart )-[]-( Electronics Engineer Code D621 ~ ~ Network Operations SPAWARSYSCEN ~ ~ \ Satellite Communications 53560 Hull St ( ~ ~ ) tel (619)524-3625 San Diego,CA __|___ /| fax (619)524-2607 92152-5001 ^\____/^^^^^^\ __| |_ astewart@spawar.navy.mil ------------^^^^^^^^^^^^^^^\__|______|_------------------------ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From astewart at spawar.navy.mil Fri Oct 15 11:31:09 1999 From: astewart at spawar.navy.mil (Alan Stewart) Date: Thu Aug 5 00:21:02 2004 Subject: What I learned at the meeting last night. (1) In-Reply-To: <3.0.4.32.19991014212407.007c8d40@cts.com> Message-ID: <199910151530.IAA07595@droid.nosc.mil> ~sdpm~ On 14 Oct 99 at 21:24, Joel Fentin wrote: >~sdpm~ >I learned about =begin and =end. Everywhere I use them, I ruin >the program. Here is an example program. My experience is these >can be placed anywhere in the program to ruin it. This program >works when they are gone. > >#!/perl/bin/perl -w >#SimpleForm.cgi >use CGI::Carp qw(carpout fatalsToBrowser); # sends errors to >browzer >use strict; >use CGI qw(:standard); > >=begin comment text >=end comment text =pod comment text =cut comment text > > print header(), start_html("1"); > print h1("11"); > print hr(), start_form(); > print p(submit("111")); > print end_form(), hr(); > print end_html(); > >-- >Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 > > I should have remembered this the other night. =begin and =end mark stuff to be parsed by some other external parser. =pod and =cut start and stop Perl code parsing. The docs in modules start with =head1 and end with =cut. The pod doc says to use =pod and =cut to add additional paragraphs to the code. --------------------------------------------------------------- Alan Stewart )-[]-( Electronics Engineer Code D621 ~ ~ Network Operations SPAWARSYSCEN ~ ~ \ Satellite Communications 53560 Hull St ( ~ ~ ) tel (619)524-3625 San Diego,CA __|___ /| fax (619)524-2607 92152-5001 ^\____/^^^^^^\ __| |_ astewart@spawar.navy.mil ------------^^^^^^^^^^^^^^^\__|______|_------------------------ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From eugenet at mailcity.com Fri Oct 15 11:54:18 1999 From: eugenet at mailcity.com (Eugene Tsyrklevich) Date: Thu Aug 5 00:21:02 2004 Subject: A quick question Message-ID: ~sdpm~ 1. you can find an answer for your =pod =cut question at http://www.perl.com/CPAN/doc/manual/html/pod/perlpod.html tip: you can replace =pod ... =cut sequence with a =comment ... =cut which makes commenting out big chunks of your code much easier. e.g. =comment print "useless output1\n"; print "useless output2\n"; print "useless output3\n"; =cut 2. the answer for your 'use strict;' question can be found at http://www.perl.com/CPAN/doc/manual/html/pod/perldsc.html#WHY_YOU_SHOULD_ALWAYS_C_use_stri http://www.perl.com/CPAN/doc/manual/html/pod/perlsub.html#Private_Variables_via_C_my_ or just run 'perldoc strict' from a command line/shell.. assuming that you have perl installed on your computer of course. I strongly recommend reading all of the http://www.perl.com/CPAN/doc/manual/html/pod/index.html documentation. regards, eugene. P.S. Are we not getting meeting notifications by email any more? Get your FREE Email at http://mailcity.lycos.com Get your PERSONALIZED START PAGE at http://my.lycos.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From astewart at spawar.navy.mil Fri Oct 15 13:27:17 1999 From: astewart at spawar.navy.mil (Alan Stewart) Date: Thu Aug 5 00:21:02 2004 Subject: What I learned at the meeting last night. (2) In-Reply-To: <3.0.4.32.19991014211520.007c8b30@cts.com> Message-ID: <199910151726.KAA06402@droid.nosc.mil> ~sdpm~ On 14 Oct 99 at 21:15, Joel Fentin wrote: >~sdpm~ >In other languages, I can place a beep in the code to see if >program execution passed through a specific area of the code. >This does not work with the following example. I was told to use > warn "something"; & >print STDERR __line__; . I don't seem to be able to use them to >advantage. > >In the following program I wish to learn how to use them to see >if execution flow passed through CCC. > > >#!/perl/bin/perl -w >use CGI::Carp qw(carpout fatalsToBrowser); # sends errors to >browzer >use strict; >use CGI qw(:standard); > >#main part of the program > >AAA(); >BBB(); >CCC(); > >#end of main part of program > > >#========================================================= >sub AAA() > {print "\07";} # beeps don't work > >#========================================================= >sub BBB(){ > print header(), start_html("1"); # program won't >work w/o this line > print end_html(); # program won't >work w/o this line >} > >#========================================================= >sub CCC() >{ > warn "something"; #? > #print STDERR __line__; #? >} > >-- >Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 > After re-reading the CGI::Carp doc, I re-wrote it a little like this: ############################################## #!/perl/bin/perl -w # BEGIN block to set up re-direction before doing anything BEGIN { # qw(carpout) imports function to send non-fatal STDERR messages to a file use CGI::Carp qw(carpout fatalsToBrowser); # this makes STDOUT the file that messages go to (to the browser) carpout(\*STDOUT); # If you don't do carpout, they will only be in the server log # this unbuffers STDOUT so messages flush out immediately $|=1; # Otherwise, the HTML and warn messages don't intermix properly } use strict; use CGI qw(:standard); #main part of the program BBB(); CCC(); #end of main part of program #========================================================= sub AAA() { warn "first thing"; } #========================================================= sub BBB() { print header(), start_html("1"); # the call to AAA() in the original code came before the start_html() and therefore # outside the HTML. The browser may not show it or it may screw up the rest of the # HTML parsing. # Call it here inside the HTML. AAA(); # or just warn here, or put the header() and start_html() in the main program warn "second thing"; print end_html(); } #========================================================= sub CCC() { # This one is also outside the HTML but some browsers (Netscape) don't mind # tacking on some text after the HTML and displaying it (definitely non-standard). warn "third thing"; } ################################################## --------------------------------------------------------------- Alan Stewart )-[]-( Electronics Engineer Code D621 ~ ~ Network Operations SPAWARSYSCEN ~ ~ \ Satellite Communications 53560 Hull St ( ~ ~ ) tel (619)524-3625 San Diego,CA __|___ /| fax (619)524-2607 92152-5001 ^\____/^^^^^^\ __| |_ astewart@spawar.navy.mil ------------^^^^^^^^^^^^^^^\__|______|_------------------------ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From joel at cts.com Fri Oct 15 16:53:06 1999 From: joel at cts.com (Joel Fentin) Date: Thu Aug 5 00:21:02 2004 Subject: What I learned at the meeting last night. (2) Message-ID: <3.0.4.32.19991015145306.0079c320@cts.com> ~sdpm~ Thank you all. I'll be a while digesting the answers. More later. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 email: joel@cts.com web: http://efm.simplenet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From wwood at ucsd.edu Mon Oct 18 16:04:52 1999 From: wwood at ucsd.edu (Bill Wood) Date: Thu Aug 5 00:21:02 2004 Subject: Need Help with CGI problem Message-ID: <4.1.19991018134948.009e9ef0@popmail.ucsd.edu> Hellppp I have started getting this error message in the output html page from a cgi script and I am having great difficulty tracking it down. Can anyone give me some insight as to where to begin looking to track this down or at least explain what the message is trying to tell me. Bare word found where operator expected at (eval 1363) line 1, near "//seaborg" (Missing operator before eaborg?) Bare word found where operator expected at (eval 1364) line 1, near "//seaborg" (Missing operator before eaborg?) Thanks in advance, Bill Wood University of California at San Diego Administrative Computing and Telecommunications - 0929 10280 North Torrey Pines Rd. La Jolla, Ca 92093-0929 EMail: wwood@ucsd.edu Phone: 858/534-1291 Fax: 858/534-7656 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/san-diego-pm/attachments/19991018/a568f755/attachment.htm From rkleeman at neta.com Mon Oct 18 16:14:59 1999 From: rkleeman at neta.com (Bobby Kleemann) Date: Thu Aug 5 00:21:02 2004 Subject: Need Help with CGI problem In-Reply-To: <4.1.19991018134948.009e9ef0@popmail.ucsd.edu> Message-ID: ~sdpm~ On Mon, 18 Oct 1999, Bill Wood wrote: > Hellppp > > I have started getting this error message in the output html page from a cgi > script and I am having great difficulty tracking it down. Can anyone give me > some insight as to where to begin looking to track this down or at least > explain what the message is trying to tell me. > > Bare word found where operator expected at (eval 1363) line 1, near "//seaborg" > (Missing operator before eaborg?) > Bare word found where operator expected at (eval 1364) line 1, near "//seaborg" > (Missing operator before eaborg?) You probably ended a string or a match/substitution too early. The fact that it is truncating the //s from what it reads indicates that your problem should be a few chars before this. _ _ _ Bobby Kleemann http://www.neta.com/~rkleeman/ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human.