Home  |  Linux  | Mysql  | PHP  | XML
From:Chris Coggins Date:Tue Feb  9 00:56:51 2010
Subject:Syntax for if
What is the proper syntax for a comparison at the end of a subroutine to
stop the script if a certain variable is "0" or ''?

sub routine{
(get data and process it)
if $varA = '' || $varA = "0" {
(stop script, print error message to user)
}
else{
(continue with script)
}
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: Traversing Hash printing two times
Re: Traversing Hash printing two times
Re: AW: Using common object, without passing it around
HTML::Template, CGI::APP with the JSON + Jquery please help.
Re: script for shutdown remote machine



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants