Perl push Function - Tutorialspoint
文章推薦指數: 80 %
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
延伸文章資訊
- 1Perl | Arrays (push, pop, shift, unshift) - GeeksforGeeks
Perl provides various inbuilt functions to add and remove the elements in an array. Function, Des...
- 2Perl push Function - Tutorialspoint
Perl push Function · Description. This function pushes the values in LIST onto the end of the lis...
- 3Manipulating Perl arrays: shift, unshift, push, pop - Perl Maven
The push function can add one or more values to the end of an array. (Well, it can also add 0 val...
- 4Perl 學習手札- 3. 串列與陣列 - Easun.org
你一定也猜到了,Perl不會讓這種事情發生的。所以Perl提供了push這個指令把你想要新增的值「推」入陣列中,同樣的,你也可以利用pop從陣列中取出最後一個元素。
- 5push - Perldoc Browser
Starting with Perl 5.14, an experimental feature allowed push to take a scalar expression. This e...