Perl push Function - Tutorialspoint

文章推薦指數: 80 %
投票人數:10人

Perl push Function · Description. This function pushes the values in LIST onto the end of the list ARRAY. Used with pop to implement stacks. · Syntax. Following ... Home CodingGround Jobs Whiteboard Tools Business Teachwithus PerlBasics Perl-Home Perl-Introduction Perl-Environment Perl-SyntaxOverview Perl-DataTypes Perl-Variables Perl-Scalars Perl-Arrays Perl-Hashes Perl-IF...ELSE Perl-Loops Perl-Operators Perl-Date&Time Perl-Subroutines Perl-References Perl-Formats Perl-FileI/O Perl-Directories Perl-ErrorHandling Perl-SpecialVariables Perl-CodingStandard Perl-RegularExpressions Perl-SendingEmail PerlAdvanced Perl-SocketProgramming Perl-ObjectOriented Perl-DatabaseAccess Perl-CGIProgramming Perl-Packages&Modules Perl-ProcessManagement Perl-EmbeddedDocumentation Perl-FunctionsReferences PerlUsefulResources Perl-QuestionsandAnswers Perl-QuickGuide Perl-UsefulResources Perl-Discussion SelectedReading UPSCIASExamsNotes Developer'sBestPractices QuestionsandAnswers EffectiveResumeWriting HRInterviewQuestions ComputerGlossary WhoisWho PerlpushFunction Advertisements PreviousPage NextPage  PerlOnlineTraining 46Lectures 4.5hours DeviKillada MoreDetail COMPLETEPERLProgramming 11Lectures 1.5hours HarshitSrivastava MoreDetail PerlforBeginners:LearnAtoZofPerlScriptingHands-on 30Lectures 6hours TELCOMAGlobal MoreDetail Description ThisfunctionpushesthevaluesinLISTontotheendofthelistARRAY.Usedwithpoptoimplementstacks. Syntax Followingisthesimplesyntaxforthisfunction− pushARRAY,LIST ReturnValue Thisfunctionreturnsnumberofelementsinnewarray. Example Followingistheexamplecodeshowingitsbasicusage− LiveDemo #!/usr/bin/perl-w $,=","; @array=(1,2); print"Beforepushingelements@array\n"; push(@array,(3,4,5)); print"Afterpushingelements@array\n"; Whenabovecodeisexecuted,itproducesthefollowingresult− Beforepushingelements12 Afterpushingelements12345 perl_function_references.htm PreviousPage PrintPage NextPage  Advertisements



請為這篇文章評分?