CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions: Re: [shafathperl2011] Perl Arithmatic: Edit Log



miller
User

Jun 1, 2011, 2:40 PM


Views: 8473
Re: [shafathperl2011] Perl Arithmatic

Add use strict; and use warnings; do the beginning of every script and declare your variables.

Also, don't forget to use a semicolon to end a statement.

That will change your code to the following:


Code
use strict; 
use warnings;

my $var1 = 100;
my $var2 = "information";

print $var1+$var2-20;


- M


(This post was edited by miller on Jun 1, 2011, 2:44 PM)


Edit Log:
Post edited by miller (User) on Jun 1, 2011, 2:43 PM
Post edited by miller (User) on Jun 1, 2011, 2:44 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives