Calculation on string : String « String « Perl

Home
Perl
1.Array
2.CGI
3.Class
4.Data Type
5.Database
6.File
7.GUI
8.Hash
9.Language Basics
10.Network
11.Regular Expression
12.Report
13.Statement
14.String
15.Subroutine
16.System Functions
17.Win32
18.XML
Perl » String » String 




Calculation on string
     

#!C:\Perl\Bin\

$thing = 5;
print "$thing \n";

$thing = $thing * 2;
print "$thing \n";

$thing = "Sauron,";
print "$thing \n";

print $thing . " The Lord of the Rings " "\n";
$thing = $thing * 2;
print "$thing\n";

$_ = "asdf! \n";
print;

   
    
    
    
    
  














Related examples in the same category
1.String Operations
2.String Operators: the right and wrong ways to perform an equivalence check on a string:
3.String plus
4.String variable
5.Strings are normally delimited by a matched pair of either double or single quotes.
6.ASCII Character Codes
7.A string is a sequence of bytes (characters) enclosed in quotes.
8.Use print to output string
9.Append two string value
10.Perl 5 String Functions
11.Using ~ operator to check if a scalar is a string type variable
12.String Literals
13.String operators
14.String value reference
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.