iLTC Home
Bookmark iLTC!
iLTC Google Boards

Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • iLoveTheCode.com
    Perl > Perl Tutorials How To Easy > Putting Two Strings Together, Concatenate

    Putting Two Strings Together, Concatenate



    To put two strings or variables together:

    $ft="London and " . "Paris";

    print "$ft";

    Which prints:
    London and Paris


    Next Example: When you concatenate variables, you don't need the quotation marks.

    $city1="London";
    $city2="Tokyo";

    $ft=$city1 . " and " . $city2;

    print "$ft";

    Which prints:
    London and Tokyo


    -We wrapped in quotations the word and with a space on each side so it would print nicely.


    Copy and Paste Perl Code:

    #!/usr/bin/perl

    print "Content-type:text/html\n\n";

    $city1="London";
    $city2="Tokyo";

    $ft=$city1 . " and " . $city2;

    print "$ft";

    exit;


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Exit a Loop with Last
    Next Article: Matching at the Beginning and End 2





    Beginning Joomla!Beginning Joomla!

    Dan Rahmel

    New $29.69

    JavaScriptJavaScript

    David Flanagan

    New $31.49

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.09

    Head First HTML with CSS...Head First HTML with CSS & XHTML

    Eric Freeman, Elis...

    New $26.39

    HTML, XHTML, and CSS All...HTML, XHTML, and CSS All-in-One Desk...

    Andy Harris, Chris...

    New $23.09

    HTML, XHTML, and CSS, Si...HTML, XHTML, and CSS, Sixth Edition ...

    Elizabeth Castro

    New $23.09

    Learning Web DesignLearning Web Design

    Jennifer Niederst ...

    New $29.69

    jQuery in ActionjQuery in Action

    Bear Bibeault, Yeh...

    New $26.39

    CSSCSS

    Eric Meyer

    New $29.69


    Of Interest:
  • Use the Perl PRINT FUNCTION
  • If, Elsif, and Else in Perl
  • Matching at the Beginning and End
  • To Reverse an Array in Perl
  • Javascript Splice - Use Splice to Replace Items in an Array in Javascript
  • Create a Function in Javascript
  • Opening a REMOTE WINDOW in Javascript
  • Javascript Superscript Text
  • HTML Background
  • Make Italic Text Using HTML
  • HTML Image
  • HTML Superscript Text

  • More Articles:
  • Use chmod in Perl
  • OPEN and WRITE a Data File in Perl
  • Write a FOREACH LOOP in Perl
  • Matching at the Beginning and End
  • onClick Javascript
  • Use onMouseOut in Javascript
  • Splitting an Array using Javascript
  • Write a For Loop in Javascript
  • Get String Length with Javascript
  • HTML Tags
  • HTML Underline Text
  • HTML Font Code
  • HTML Image

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    581,266
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:17 EDT