Difference between revisions of "PERL/C2/Array-functions/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 558: Line 558:
 
|-
 
|-
 
|08:59
 
|08:59
|Add ''' https:// ''' at the start of an newly created '''Array''' 
+
| નવા બનાવેલા એરેની શરૂઆતમા  ''' https:// ''' ઉમેરો.
  
 
|-
 
|-
 
|09:06
 
|09:06
|Remove ''' element “Perl” ''' from the '''Array '''
+
| એરેમાંથી પર્લ એલિમેન્ટ કાઢી નાખો.
  
 
|-
 
|-
 
|09:09
 
|09:09
|Declare number '''Array ''' and sort it
+
| નંબર એરે ડીકલેર કરીને સોર્ટ કરો.
  
 
|-
 
|-
 
|09:12
 
|09:12
|Watch the video available at the following link
+
|આપેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો.
 
   
 
   
 
|-
 
|-
 
|09:15
 
|09:15
|It summaries the Spoken Tutorial project
+
|તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે.
 
   
 
   
 
|-
 
|-
 
|09:19
 
|09:19
|If you do not have good bandwidth, you can download and watch it
+
|જો તમારી પાસે સારી બેન્ડવિડ્થ ન હોય તો, તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો.
 
   
 
   
 
|-
 
|-
 
| 09:24
 
| 09:24
The Spoken Tutorial Project Team  Conducts workshops using spoken tutorials
+
સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.
 
   
 
   
 
|-
 
|-
 
|09:30
 
|09:30
|Gives certificates to those who pass an online  test
+
|જેઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.
+
 
 
|-
 
|-
 
|09:34
 
|09:34
|For more details, please write to contact at spoken hyphen tutorial dot org
+
|વધુ વિગતો માટે, કૃપા કરી contact@spoken-tutorial.org પર લખો
 
   
 
   
 
|-
 
|-
 
| 09:40
 
| 09:40
Spoken Tutorial Project is a part of the Talk to a  Teacher project
+
સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટોક ટુ અ ટીચર પ્રોજેક્ટનો એક ભાગ છે.
 
   
 
   
 
|-
 
|-
 
|09:44
 
|09:44
|It is supported by the National Mission on Education through ICT, MHRD, Government of India.
+
|જેને આઈસીટી, એમએચઆરડી, ભારત સરકાર મારફતે શિક્ષણ પર નેશનલ મિશન દ્વારા આધાર અપાયેલ છે.  
 
   
 
   
 
|-
 
|-
 
|09:51
 
|09:51
|More information on this Mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro
+
|આ મિશન પર વધુ માહિતી '''spoken hyphen tutorial dot org slash NMEICT hyphen Intro''' આ લીંક પર ઉપલબ્ધ છે.
 
   
 
   
 
|-
 
|-
 
| 10:02
 
| 10:02
Hope you enjoyed this Perl tutorial.  
+
આશા રાખું છું કે તમને આ પર્લ ટ્યુટોરીયલ ગમ્યું હશે.  
+
 
 
|-
 
|-
 
|10:04
 
|10:04
|This is Amol signing off.
+
|આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું.  
 
   
 
   
 
|-
 
|-
 
|10:06
 
|10:06
|Thanks for joining.
+
|જોડાવાબદ્દલ આભાર.  
 
   
 
   
 
|}
 
|}

Revision as of 16:38, 10 October 2014

Time Narration
00:01 પર્લમા Array Functions પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
00:06 આ ટ્યુટોરીયલમાં, આપણે પર્લમા Array functions વિશે શીખીશું જેમ કે,
00:11 push
00:11 pop
00:12 shift
00:14 unshift
00:15 split
00:16 splice
00:17 અને join
00:18 sort
00:19 qw
00:20 હું વાપરી રહ્યી છું ઉબુન્ટુ લીનક્સ 12.04 ઓપરેટીંગ સીસ્ટમ અને પર્લ 5.14.2
00:28 તેમજ હું gedit ટેક્સ્ટ એડીટર પણ વાપરીશ.
00:32 તમે તમારા પસંદનું કોઈપણ ટેક્સ્ટ એડીટર વાપરી શકો છો.
00:36 તમને પર્લમાં વેરીએબલો , ડેટા સ્ટ્રક્ચરો, અને એરેની સામાન્ય જાણકારી હોવી અનિવાર્ય છે.
00:43 Comments, loops અને conditional statements નું જ્ઞાન હોવું ફાયદાકારક નીવડશે.
00:48 સ્પોકન ટ્યુટોરીયલ વેબસાઈટ પર સંદર્ભિત સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો.
00:54 પર્લ અમુક ઇનબિલ્ટ ફંક્શન પૂરી પાડે છે
00:57 આ ફંક્શન એરે પર વિવિધ ક્રિયા કરી શકે છે.
Time Narration
00:01 પર્લમા Array Functions પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
00:06 આ ટ્યુટોરીયલમાં, આપણે પર્લમા Array functions વિશે શીખીશું જેમ કે,
00:11 push
00:11 pop
00:12 shift
00:14 unshift
00:15 split
00:16 splice
00:17 અને join
00:18 sort
00:19 qw
00:20 હું વાપરી રહ્યી છું ઉબુન્ટુ લીનક્સ 12.04 ઓપરેટીંગ સીસ્ટમ અને પર્લ 5.14.2
00:28 તેમજ હું gedit ટેક્સ્ટ એડીટર પણ વાપરીશ.
00:32 તમે તમારા પસંદનું કોઈપણ ટેક્સ્ટ એડીટર વાપરી શકો છો.
00:36 તમને પર્લમાં વેરીએબલો , ડેટા સ્ટ્રક્ચરો, અને એરેની સામાન્ય જાણકારી હોવી અનિવાર્ય છે.
00:43 Comments, loops અને conditional statements નું જ્ઞાન હોવું ફાયદાકારક નીવડશે.
00:48 સ્પોકન ટ્યુટોરીયલ વેબસાઈટ પર સંદર્ભિત સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો.
00:54 પર્લ અમુક ઇનબિલ્ટ ફંક્શન પૂરી પાડે છે
00:57 આ ફંક્શન એરે પર વિવિધ ક્રિયા કરી શકે છે.
01:02 પ્રથમ એરેના છેલ્લા પોઝીશન પર એલિમેન્ટ ઉમેરવા ને કાઢવા વિષે શીખીશું.
01:08 આ કરવા માટે આપણી પાસે છે.
01:10 push function જે એરેના છેલ્લા પોઝીશન પર એલિમેન્ટ ઉમેરશે.
01:15 અને pop function ના છેલ્લા પોઝીશન પરથી એલિમેન્ટ કાઢી નાખ્યા.
01:21 સેમ્પલ પ્રોગ્રામ વાપરીને push અને pop ફંક્શન સમજીને લેશું.
01:26 ટર્મિનલ ખોલો અને ટાઈપ કરો gedit perlArray dot pl space ampersand
01:33 અને Enter દબાઓ.
01:36 gedit માં perlArray dot pl ફાઈલ ખોલશે.
01:41 સ્ક્રીન પર દર્શાવેલ કોડ ટાઈપ કરો.
01:45 અહી આપણે એરે ની 3 length ડીકલેર કરી છે.
01:50 push function એરેના છેલ્લા પોઝીશન એટલેકે 3 પછી એલિમેન્ટ દાખલ કરશે.
01:57 જયારે pop function એરેના છેલ્લા પોઝીશન પર એલિમેન્ટને કાઢશે.
02:04 આપણા કિસ્સા મા એરેમાંથી 4 કાઢવામા આવશે.
02:08 ફાઈલ સેવ કરવા માટે Ctrl + S દબાવો.
02:11 push function બે આર્ગ્યુમેન્ટો લે છે'-
02:14 push function નું પહેલું આર્ગ્યુમેન્ટ એટલેકે એરે જેમાં એલિમેન્ટ ઉમેરવાનું છે.
02:20 બીજું આર્ગ્યુમેન્ટ એટલેકે એલિમેન્ટ જે એરેમા સમાવિષ્ઠ કરવાના છે.
02:25 pop function નું સિન્ટેક્સ આપેલ પ્રમાણે છે -
02:29 pop function ફક્ત એકજ આર્ગ્યુમેન્ટ લે છે.
02:32 તે એરે જેમાંથી એલિમેન્ટ કાઢી કાઢવાનું છે.
02:36 નોંધ: બંને ફન્કશનો એરેના છેલ્લા પોઝીશન પર કાર્ય કરે છે.
02:41 pop function દ્વારા કાઢી કાઢેલ એલિમેન્ટ અન્ય વેરીએબલમા સમાવિષ્ઠ થાય છે.
02:46 આ માટે સિન્ટેક્સ છે. $variable space = space pop open bracket @myArray close bracket
02:57 હવે ટર્મિનલ પર જાઓ અને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરો.
03:01 ટાઈપ કરો perl perlArray dot pl અને Enter. દબાઓ.
03:07 આઉટપુટ ટર્મિનલ પર દેખાય છે.
03:11 હવે ચાલો જોઈએ કેવી રીતે એરેના પ્રથમ પોઝીશન પર એલિમેન્ટને ઉમેરવું અને કાઢી કાઢવું.
03:18 આ ઉપયોગ થઈ શકે છે-
03:20 unshift function -જે એરેના પ્રથમ પોઝીશન પર એલિમેન્ટને ઉમેરશે.
03:25 shift function --જે એરે માંથી પ્રથમ પોઝીશન કાઢશે.
03:31 ચાલો સેમ્પલ પ્રોગ્રામ વાપરીને તેને સમજીએ.
03:35 મેં પહેલાથી જ બનાવેલ perlArray dot pl ફાઈલ ખોલીશ.
03:39 સ્ક્રીન પર દેખાય છે તે કોડને ટાઈપ કરો.
03:43 unshift ફન્ક્શન પ્રથમ પોઝીશન એટલેકે 1 ના પહેલા એલિમેન્ટને સમાવિષ્ઠ કરશે.
03:52 shift ફન્ક્શન એરે માંથી પ્રથમ પોઝીશન કાઢશે.
03:57 આપણા કિસ્સામા zero કાઢશું.
04:00 ફાઈલ સેવ કરવા માટે Ctrl + S દબાઓ.
04:03 The unshift functionબે આર્ગ્યુમેન્ટ લે છે -
04:06 પ્રથમ આર્ગ્યુમેન્ટ એટલેકે એરે જેમાં એલિમેન્ટ ઉમેરવાના છે.
04:10 બીજું આર્ગ્યુમેન્ટ એટલેકે એલિમેન્ટ જે એરેમાં ઉમેરવાનું છે
04:15 shift functionફક્ત એક જ આર્ગ્યુમેન્ટ લે છે-
04:18 આ એ એરે છે જેના એલિમેન્ટ કાઢવાના છે.
04:22 નોંધ લો બંને ફ્ન્ક્શનો એરેના પ્રથમ પોઝીશન પર કાર્ય કરે છે.
04:27 shift function દ્વારા કાઢેલ એલિમેન્ટને આપણે વેરીએબ્લમાં એકત્રિત કરીએ છીએ.
04:33 આ માટે સિન્ટેક્સ છે - $variable space = space shift open bracket @myArray close bracket
04:44 પછી ટર્મિનલ પર જાઓ અને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરો.
04:48 ટાઈપ કરો perl perlArray dot pl અને Enter દબાઓ.
04:54 પ્રકાશિત થયેલ આઉટપુટ ટર્મિનલ પર દેખાય છે.
04:59 તો ચાલો જોઈએ એરેના નિર્દિષ્ટ કરાયેલ પોઝીશન પાસે થી એલિમેન્ટને કેવી રીતે કાઢવું.
05:05 splice function એરેના નિર્દિષ્ટ કરાયેલ પોઝીશન પાસે થી એલિમેન્ટ કાઢે છે.
05:11 કાઢેલ એલિમેન્ટના એરે તે આ ફંક્શનની રીટર્ન વેલ્યુ છે.


05:17 ચાલો સેમ્પલ પ્રોગ્રામ વાપરીને તેને સમજીએ.
05:21 પહેલા થી બનાવેલ perlArray dot pl ફાઈલ પર જાઓ.
05:26 સ્ક્રીન પર બતાવેલ કોડ ટાઈપ કરો.
05:30 જેના પાસે થી આપણને એલિમેન્ટ કાઢવાનું છે તેનું index પૂરું પાડવું પડશે. અને
05:35 તેમજ offset જ્યાં શુધી એલિમેન્ટ કાઢવાનું છે.
05:39 આપણા કિસ્સામા 5 અને 6 એલિમેન્ટ કાઢવામા આવે છે.
05:44 ટર્મિનલ પર જાઓ અને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરવા માટે ટાઈપ કરો -
05:49 perl perlArray dot pl અને Enter. દબાઓ.
05:55 ટર્મિનલ પર આઉટપુટ દેખાય છે.
05:59 હવે એરેના બીજા અન્ય inbuilt functions ફંક્શન જોઈએ.
06:04 સ્ટ્રીંગ નિર્દિષ્ટ delimiter. ના ભાગલા કરવા માટે split function વપરાય છે.
06:10 એરેએ આ ફંક્શન ની રીટર્ન વેલ્યુ છે.
06:14 આ એરેનું એલિમેન્ટ એટલેકે સ્ટ્રીંગ નું વિભાજીત કરેલ પોઝીશન હોય છે.
06:19 join function નિર્દિષ્ટ ડેલીમીટર વાપરીને એરેના એલિમેન્ટને જોડે છે.
06:25 તે જોડેલા એલિમેન્ટની સ્ટ્રીંગ પછી આપે છે.
06:28 sort function એરેને મૂળાક્ષર / સંખ્યાત્મક ક્રમમા ગોઠવે છે.
06:34 qw ફંક્શન white space થી અલગ કરેલ શબ્દના એરે આપણને આપે છે.
06:40 ચાલો સેમ્પલ પ્રોગ્રામ વાપરીને બધા ફ્ન્ક્શનો વિષે સમજીએ.
06:45 ટર્મિનલ પર જાઓ અને ટાઈપ કરો
06:48 gedit arrayFunctions dot pl space ampersand અને Enter દબાઓ.
06:55 સ્ક્રીન પર આપેલ કોડ ટાઈપ કરો.
07:00 આ કિસ્સામાં સ્ટ્રીંગ વેરીએલબના પ્રત્યેક શબ્દ એરેનું એલિમેન્ટ બનશે.
07:07 અહી નવા એરેના દરેક એલિમેન્ટને કોમાથી જોડવામા આવશે.
07:12 sort function એરેના એલિમેન્ટને મૂળાક્ષર ક્રમમાં ગોઠવશે.
07:19 qw function સ્પેસ આપીને અલગ કરેલ શબ્દના એરે બનાવે છે.
07:25 ચાલો પ્રત્યેક ફન્કશનને સમજીએ.
07:28 split function બે આર્ગ્યુમેન્ટ લે છે.
07:31 પ્રથમ આર્ગ્યુંમ્નેત એટલેકે ડીલીમીટર જેથી આપણા સ્ટ્રીંગને વિભાજિત કરાશે.
07:36 બીજું એ સ્ટ્રીંગ છે જે વિભાજિત કરવાની જરૂર છે.
07:39 ડેલીમીટર એ ફોરવર્ડ સ્લેશ,સિંગલ અથવા ડબલ કોટસ બોલાવાય છે.
07:45 join function બે આર્ગ્યુમેન્ટ લે છે.
07:48 પ્રથમ એટલેકે જે ડેલીમીટર દ્વારા આપણને એરે એલિમેન્ટ જોડવાનું છે.
07:53 બીજું એ એરે છે .
07:55 ડેલીમીટર એ સિંગલ અથવા ડબલ કોટથી નિર્દિષ્ટ કરાવાય છે.
07:58 sort function ફક્ત એક આર્ગ્યુમેન્ટ લે છે એટલેકે એરે જે ગોઠવવાના છે.
08:05 qw function સ્પેસ દ્વારા અલગ કરેલ શબ્દના એરે આપશે.
08:11 આપણે qw. વાપર્યું હોવાથી શબ્દ કોટસમાં લખવાની જરૂરત નથી.
08:17 Then switch to the terminal and execute the Perl script by typing - ટર્મિનલ પર જાઓ અને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરવા માટે ટાઈપ કરો
08:23 perl arrayFunctions dot pl
08:26 અને Enter. દબાઓ.
08:29 આપેલ આઉટપુટ સ્ક્રીન પર દેખાય છે.
08:33 ચાલો સારાંશ લઈએ.
08:34 આ ટ્યુટોરીયલ માં આપણે શીખ્યા -
08:36 એરેમાં એલિમેન્ટ ઉમેરવા અથવા કાઢવા.
08:40 સેમ્પલ પ્રોગ્રામ વાપરીને એરે પર બેજીક ફંક્શન કરવા.
08:46 અહી તમારા માટે અસાઈનમેન્ટ છે -
08:48 'script.spoken-tutorial.org/index.php/Perl'
08:54 આ આપલે સ્ક્રીપ્ટ '/ ' (forward slash) ડીલીમીટર થી સ્પ્લીટ કરો.
08:59 નવા બનાવેલા એરેની શરૂઆતમા https:// ઉમેરો.
09:06 એરેમાંથી પર્લ એલિમેન્ટ કાઢી નાખો.
09:09 નંબર એરે ડીકલેર કરીને સોર્ટ કરો.
09:12 આપેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો.
09:15 તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે.
09:19 જો તમારી પાસે સારી બેન્ડવિડ્થ ન હોય તો, તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો.
09:24 સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.
09:30 જેઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.
09:34 વધુ વિગતો માટે, કૃપા કરી contact@spoken-tutorial.org પર લખો
09:40 સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટોક ટુ અ ટીચર પ્રોજેક્ટનો એક ભાગ છે.
09:44 જેને આઈસીટી, એમએચઆરડી, ભારત સરકાર મારફતે શિક્ષણ પર નેશનલ મિશન દ્વારા આધાર અપાયેલ છે.
09:51 આ મિશન પર વધુ માહિતી spoken hyphen tutorial dot org slash NMEICT hyphen Intro આ લીંક પર ઉપલબ્ધ છે.
10:02 આશા રાખું છું કે તમને આ પર્લ ટ્યુટોરીયલ ગમ્યું હશે.
10:04 આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું.
10:06 જોડાવાબદ્દલ આભાર.

| 01:02 | પ્રથમ એરેના છેલ્લા પોઝીશન પર એલિમેન્ટ ઉમેરવા ને કાઢવા વિષે શીખીશું.

|- |01:08 | આ કરવા માટે આપણી પાસે છે.

|- |01:10 | push function જે એરેના છેલ્લા પોઝીશન પર એલિમેન્ટ ઉમેરશે.

|- |01:15 | અને pop function ના છેલ્લા પોઝીશન પરથી એલિમેન્ટ કાઢી નાખ્યા.

|- |01:21 | Let us understand push and pop functions by using a sample program.

|- |01:26 |Open the terminal and type gedit perlArray dot pl space ampersand

|- |01:33 | And Press Enter

|- | 01:36 |This will open perlArray dot pl file in gedit.

|- |01:41 |Type the code as shown on the screen

|- |01:45 | Here, we have declared an Array of length 3.

|- | 01:50 | push function will insert an element at the last position of this Array i.e after 3;

|- |01:57 |whereas, pop function will remove an element from the last position of the Array.

|- |02:04 |In our case, 4 will be removed from the Array.

|- |02:08 |Press Ctrl + S to save the file.

|- |02:11 |push function takes 2 arguments-

|- |02:14 |1st argument to the push function, is the Array in which to add an element.

|- |02:20 | 2nd argument is the element which is to be pushed into the Array.

|- |02:25 | The syntax of pop function is as follows -

|- |02:29 | pop function takes only one argument

|- |02:32 |It is the Array from which an element needs to be removed.

|- |02:36 |Note: Both these functions work at last position of an Array.

|- |02:41 |The element removed by pop function can be collected into another variable.

|- |02:46 |The syntax for this is $variable space = space pop open bracket @myArray close bracket

|- |02:57 |Now switch to the terminal and execute the Perl script.

|- |03:01 |Type perl perlArray dot pl and press Enter.

|- | 03:07 | The output is as shown on the terminal.

|- | 03:11 | Now, let us see how to add/remove an element from the 1st position of an Array.

|- | 03:18 |This can be achieved using-

|- |03:20 | unshift function - which adds an element to an Array at the 1st position

|- |03:25 | shift function - which removes the first element from an Array.

|- | 03:31 |Let us understand this using a sample program.

|- |03:35 |I will open perlArray dot pl file which I have already created.

|- | 03:39 | Type the following piece of code as shown on the screen.

|- | 03:43 | unshift function will insert an element at the first position i.e before 1

|- | 03:52 | shift function will remove an element from the first position.

|- | 03:57 | In our case, zero will be removed.

|- | 04:00 | Press Ctrl + S to save the file.

|- |04:03 |The unshift function takes 2 arguments -

|- |04:06 |1st argument is the Array in which to add an element

|- |04:10 | 2nd argument is the element to be added into the Array

|- |04:15 | shift function takes only one argument -

|- |04:18 |This is the Array from which the element needs to be removed.

|- | 04:22 | Note: Both these functions works at first position of an Array.

|- | 04:27 | We can collect the element removed by shift function into some variable.

|- |04:33 |This syntax for this is - $variable space = space shift open bracket @myArray close bracket

|- |04:44 |Then switch to the terminal and execute the Perl script.

|- |04:48 |Type perl perlArray dot pl and press Enter.

|- |04:54 |The output displayed on the terminal is as highlighted.

|- |04:59 |Now, let us see how to remove an element from a specified position of an Array.

|- |05:05 | splice function removes an element from a specified position of an Array.

|- |05:11 |The return value of this function is an Array of removed elements.

|- |05:17 |Let us understand this using a sample program.

|- | 05:21 |Go to the perlArray dot pl file, which we created earlier.

|- | 05:26 | Type the piece of code as shown on the screen.

|- |05:30 | We need to provide index from where we want to remove the elements and

|- | 05:35 | the offset upto which we want to remove the elements

|- | 05:39 | In our case, the elements 5 and 6 will be removed.

|- | 05:44 | Then switch to the terminal and execute the Perl script by typing -

|- | 05:49 | perl perlArray dot pl and press Enter.

|- |05:55 |The output is as shown on the terminal

|- | 05:59 | Now let us look at few other inbuilt functions of Arrays.

|- | 06:04 | split function is used to divide a string at a specified delimiter.

|- |06:10 |The return value of this function is an Array.

|- | 06:14 |The elements of this Array are the divided portions of the string.

|- |06:19 | join function joins the elements of an Array , using the specified delimiter.

|- |06:25 |It returns a string of joined elements.

|- | 06:28 | sort function sorts an Array in alphabetical/numerical order.

|- | 06:34 | qw function returns an Array of words, separated by a white space.

|- | 06:40 | Now let us understand all these functions using a sample program.

|- | 06:45 |Switch to terminal and type

|- |06:48 | gedit arrayFunctions dot pl space ampersand and Press Enter

|- |06:55 |Type the following piece of code as shown on screen.

|- |07:00 |In this case, each word of the variable string will become an element of an Array

|- |07:07 | Here, each element of newArray will be joined by comma.

|- |07:12 | sort function will sort the elements of an Array in alphabetical order.

|- |07:19 | qw function creates an Array of words separated by space.

|- |07:25 | Let us understand each function.

|- |07:28 |split function takes two arguments.

|- |07:31 | 1st argument is the delimiter by which the string needs to be split

|- |07:36 | 2nd is the string which needs to be split.

|- |07:39 |Delimiters can be specified in forward slash, single or double quotes.

|- |07:45 | join function takes 2 arguments.

|- |07:48 |1st is the delimiter by which the Array elements needs to be joined.

|- |07:53 |2nd is the Array.

|- |07:55 |Delimiters can be specified in single or double quotes.

|- |07:58 | sort function takes a single argument , which is the Array that needs to be sorted.

|- |08:05 | qw function returns an Array of words, separated by space.

|- |08:11 |It is not necessary to specify the word in quotes , if written using qw.

|- |08:17 |Then switch to the terminal and execute the Perl script by typing -

|- |08:23 | perl arrayFunctions dot pl

|- |08:26 |and press Enter.

|- |08:29 |The following output is displayed on the screen.

|- |08:33 |Let us summarize.

|- |08:34 |In this tutorial, we have learnt to -

|- |08:36 |add/remove elements from an Array

|- |08:40 |basic functions which can be performed on Array using sample programs

|- |08:46 |Here is assignment for you -

|- |08:48 |'script.spoken-tutorial.org/index.php/Perl'

|- |08:54 |split the above string at '/ ' (forward slash) delimiter

|- |08:59 |Add https:// at the start of an newly created Array

|- |09:06 |Remove element “Perl” from the Array

|- |09:09 |Declare number Array and sort it

|- |09:12 |Watch the video available at the following link

|- |09:15 |It summaries the Spoken Tutorial project

|- |09:19 |If you do not have good bandwidth, you can download and watch it

|- | 09:24 | The Spoken Tutorial Project Team Conducts workshops using spoken tutorials

|- |09:30 |Gives certificates to those who pass an online test

|- |09:34 |For more details, please write to contact at spoken hyphen tutorial dot org

|- | 09:40 | Spoken Tutorial Project is a part of the Talk to a Teacher project

|- |09:44 |It is supported by the National Mission on Education through ICT, MHRD, Government of India.

|- |09:51 |More information on this Mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro

|- | 10:02 | Hope you enjoyed this Perl tutorial.

|- |10:04 |This is Amol signing off.

|- |10:06 |Thanks for joining.

|}

Contributors and Content Editors

Jyotisolanki, PoojaMoolya