[WindyCity-pm] || return a value?
Richard Reina
richard at rushlogistics.com
Fri Jun 27 13:26:18 PDT 2008
I am trying to write a statement like:
#!/usr/bin/perl5 -w
sub display {
my $dbh = DBI->connect(blah, blah, ...) || return 2; # return 2 means no connection possible
snip...
} # end of sub display
1;
However, the value that is returned ( even if the connection fails ) is the one at the end of the sub.
Does anyone know what I might be doing wrong?
More information about the WindyCity-pm
mailing list