A UNIX Command
$perl scalar.pl
The variable $fred contains Fred here.
Sum is 66.
$cat scalar.pl
$fred = "Fred here";
$barney = 56;
$sum = 10 + $barney;
print 'The variable $fred' . " contains $fred.n";
print "Sum is $sum.n";

$cat scalar.pl
$fred = "Fred here";
$barney = 56;
$sum = 10 + $barney;
print 'The variable $fred.' . " contains $fred.n";
print "Sum is $sum.n";

$perl scalar.pl
The variable $fred. contains Fred here.
Sum is 66.
$cat scalar.pl
$fred = "Fred here";
$barney = 56;
$sum = 10 + $barney;
print "The variable $fred." . " contains $fred.n";
print "Sum is $sum.n";

$perl scalar.pl
The variable Fred here. contains Fred here.
Sum is 66.
$

UNIX Explanation
Various operations on scalar (string) variables.

source: http://sandbox.mc.edu/~bennet/perl/leccode/var1_pl.html

Copyright © 2009,  2010,  2011,  2012,  2013, 2014     BeautifulWork Project    e-mail:  ahiliation@yahoo.co.in
BeautifulWork Project comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.