iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • Perl with cheese...
    123,749

    iLoveTheCode.com
    Perl > Perl Tutorials How To Easy > Add to End of an Array with Push in Perl

    Add to End of an Array with Push in Perl



    @ko="Hello";

    push(@ko, "Hi");

    print @ko;


    Which Prints:
    HelloHi


    -We created an array and named it ko because we like typing shorter names more than long ones.
    -We stored Hello in our array.
    -We used Perl's built-in push function to add to the end of our array.
    -We put the thing to be pushed (or added) in quotation marks.
    -We used Perl's built-in print function.


    Copy and Paste Perl Code:

    #!/usr/bin/perl

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

    @ko="Hello";
    push(@ko, "Hi");

    print @ko;

    exit;



    Resources:
    Add to the Beginning of an Array with Unshift in Perl
    Create or Put Items into an Array in Perl
    Use the Perl PRINT FUNCTION



    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Create or Put Items into an Array in Perl
    Next Article: Add to the Beginning of an Array with Unshift in Perl





    New Perspectives on HTML...New Perspectives on HTML and XHTML 5...

    Partrick Carey

    New $67.45

    HTML & XHTMLHTML & XHTML

    Chuck Musciano, Bi...

    New $29.99

    jQuery in ActionjQuery in Action

    Bear Bibeault, Yeh...

    New $26.39

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

    Elizabeth Castro

    New $23.09

    CSSCSS

    David McFarland

    New $23.09

    Creating Web SitesCreating Web Sites

    Matthew MacDonald

    New $19.77

    HTMLHTML

    Gary B. Shelly, Th...

    New $84.55

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

    Eric Freeman, Elis...

    New $23.99

    Information Architecture...Information Architecture for the Wor...

    Louis Rosenfeld, P...

    New $26.39


    Of Interest:
  • Getting Server Time in Perl
  • Splitting an ARRAY in Perl
  • Exit a Loop with Last
  • If, Elsif, and Else in Perl
  • Javascript Bold Text
  • Javascript Array - Create an Array in Javascript
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Javascript Uppercase Text
  • HTML Underline Text
  • HTML Font Code
  • HTML Forms
  • Make a New Paragraph Using HTML

  • More Articles:
  • Write a FOREACH LOOP in Perl
  • Putting Two Strings Together, Concatenate
  • Matching at the Beginning and End
  • Opening and Reading a Directory in Perl
  • onClick Javascript
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Splitting an Array using Javascript
  • If, Else If, and Else in Javascript
  • Increment a Variable in Javascript
  • HTML Background
  • Make a Line Return Using HTML
  • Make Italic Text Using HTML
  • HTML Subscript Text

  • 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


    420,510
    Counter by iLoveTheCode.com


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