Why is return 1 coded at the end of many programs. For example: I know it means true but what does this do and why? thank you derek
#!/usr/bin/perl #use strict; my $user_name = qq(dsmithxx); my $user_password = qq(xxxx); my $sql_server = qq(xxxxx); my ($dbh,$drh,$stmt); local ($whichmethod,$forminfo,%FORM_DATA); use DBI; sub initialize_dbi { $drh = DBI->install_driver('mysql'); $dbh = DBI->connect("DBI:mysql:$user_name:$sql_server", $user_name, $user_password) or die "did not connect to DBI: $!"; } sub run_statement { $stmt = "$_[0]"; $sth = $dbh->prepare($stmt); $sth->execute; } sub parse_input { $whichmethod = $ENV{'REQUEST_METHOD'}; ($forminfo,%FORM_DATA); if($whichmethod eq "GET"){ $forminfo = $ENV{"QUERY_STRING"}; }else{ $forminfo = <STDIN>; } my @key_value_pairs = split(/&/,$forminfo); foreach my $pair (@key_value_pairs){ my ($key,$value) = split(/=/,$pair); $value =~ s/\+/ /g; $value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg; $value =~ s/'/\\'/g; $FORM_DATA{$key} = $value; } } sub print_header { print "Content-type: text/html \n\n"; } return 1; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>