PERL/C2/Functions-in-Perl/Khasi
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Khublei ngi pdiangsngewbha iaphi sha ka spoken tutorial halor ka Functions in PERL. |
00:06 | Ha kane ka jinghikai, ngin ia pule shaphang ka: |
00:10 | PERL functions, functions ryngkat ki arguments |
00:13 | functions ryngkat ki return values. |
00:16 | Na ka bynta kane ka jinghikai, nga pyndonkam da ka: |
00:18 | Ubuntu Linux 12.04 operating system |
00:22 | Perl 5.14.2 bad |
00:24 | gedit Text Editor. |
00:27 | Phi lah ban pyndonkam da kano kano ka text editor katkum kamon jong phi. |
00:31 | Phi dei ban don ia ki jingtip jong ki variables, comments, loops, conditional statements baddata Structures ha ka PERL. |
00:41 | Sngewbha leit sha ki spoken tutorials ba iadei ha ka Spoken Tutorial website. |
00:47 | Ngin ia peit nyngkong ia katto katne ki PERL functions kiba suk. |
00:51 | Ha ka PERL, ia ki functions, kiba la khot ruh kum ki subroutines, lah declare bad ka sub keyword. |
00:57 | Ka jingbatai jong ka declared function la thoh hapdeng ki curly braces. |
01:03 | Kane ka function kam shim ia kino kino ki arguments. |
01:07 | Bad, kam pynphai ia kaei kaei ruh em. |
01:10 | Kynmaw: ka function definition lah ban thoh hangno hangno hapoh jong ka script lane ha kawei pat ka module. |
01:17 | Kane ka module kadei ban shah kynthup ha ka script, ban pyndonkam ia kane ka function. |
01:24 | Ban kynthup ia ka module file ha ka script, dei ban pyndonkam ia ka syntax harum: |
01:31 | use ModuleFileName semicolon |
01:35 | To ngin ia pyrshang ban sngewthuh ia kane da kaba pyndonkam da ka sample program. |
01:39 | Plie ia ka file ha ka text editor jong phi bad jer kyrteng ia ka ka simpleFunction dot pl. |
01:46 | Hangne ka simpleFunction dot pl file jong nga ha ka gedit. |
01:51 | Type ia u code kumba la pyni ha ka screen. |
01:55 | Hangne, ngi shu call ia ka function kaba ngi lah dep defined. |
02:00 | Nangta ka execution control ka pass sha kata ka function. |
02:06 | Kane kadei ka declaration & definition jong ka function. |
02:10 | Kane ka function kan sa print out ia ka text ba la ai: |
02:14 | Save ia ka file jong phi. |
02:17 | Nangta phai sha ka terminal bad execute ia ka PERL script da kaba type: |
02:24 | perl simpleFunction dot pl |
02:28 | Bad shon Enter. |
02:30 | Ka output kan sa long kumba la pyni ha ka terminal. |
02:38 | Mynta, to ngin ia peit ia ka function ryngkat ki arguments. |
02:44 | To ngin ia pyrshang ban sngewthuh ia kane ka function da kaba pyndonkam ia ka sample program. |
02:48 | Plie ia ka file ha ka text editor jong phi bad jer kyrteng ia ka functionWithArgs dot pl. |
02:57 | Hangne ka functionWithArgs script jong nga ha ka gedit. |
03:02 | Type ia u code harum kumba la pyni ha ka screen. |
03:07 | Hangne, ngi call ia ka function ryngkat ki arguments 10 bad 20. |
03:13 | Ki arguments kiba lah pass ki lah don ha ki '$var1' & '$var2'. |
03:20 | @_ kadei ka Perl variable ba kyrpang. Ngin ia peit bniah ia ki ha ka jinghikai ba shadien. |
03:29 | Kane ka function ka leh ia ka addition jong 2 tylli ki variables bad ka print ia ka jubab. |
03:37 | Save ia ka file jong phi. |
03:42 | @_ kadei ka Perl array kaba kyrpang. |
03:46 | Kane ka array lah pyndonkam ban buh ia ki arguments ba lah passed. |
03:51 | Ha kajuh ka rukom, ngi lah ban shim bad buh ia ki arguments ba lah pass ha ki variables kum: |
03:56 | $var1 space = space shift @_ semicolon |
04:04 | $var2 space = space shift @_ semicolon |
04:12 | shift @_ ka weng ia ki element ha ka position ba nyngkong na ka @_ array |
04:21 | Bad assign ia ka sha ka variable. |
04:24 | Kawei pat ka rukom kadei: $var1 space = space dollar underscore open square bracket zero close square bracket semicolon. |
04:38 | $var2 space = space dollar underscore open square bracket 1 close square bracket semicolon. |
04:49 | Ki rukom ba lah kdew haneng ki ia syriem ha kaban wanlam ia ki elements jong ka @_ array da kaba pyndonkam ia ka index. |
04:59 | Mynta, phai sha ka terminal bad execute ia ka script da kaba type: |
05:06 | perl functionWithArgs dot pl bad shon Enter . |
05:14 | Ka output kadei kumba la pyni ha ka screen. |
05:23 | Mynta, to ngin ia peit ia ka function kaba pynphai ia uwei u value. |
05:32 | To ngin pyrshang ban sngewthuh ia kane, da kaba pyndonkam ia ka sample program. |
05:35 | To ngan phai sha ka funcWithSingleRtrnVal dot pl script ha ka gedit. |
05:46 | Plie ia ka file ha ka text editor jong phi bad type ia u code harum kumba la pyni. |
05:52 | Hangne, ngi call ia ka addVariables function ryngkat ki parameters 10 bad 20. |
06:01 | U value ba la pynphai na ka function la buh ha ka '$addition' variable. |
06:09 | Kane ka function ka leh ia ka addition jong ki parameters ba lah passed bad ka pynphai ia ka jubab. |
06:15 | Save ia ka file. |
06:17 | Mynta, to ngin iaexecute ia ka script. |
06:20 | Te, phai sha ka terminal bad type: |
06:24 | perl funcWithSingleRtrnVal dot pl bad shon Enter. |
06:35 | Ka output kadei kumba la pyni ha ka terminal. |
06:43 | Mynta, to ngin ia peit ia ka function kaba pynphai ia bun tylli ki values. |
06:48 | To ngin ia pyrshang ban sngewthuh ia kane, da kaba pyndonkam ia ka sample program. |
06:53 | Ha ka gedit, nga lah plie ia ka file bad lah jer kyrteng kum funcWithMultipleRtrnVals dot pl. |
07:04 | Sngewbha leh kumjuh ha ka text editor jong phi. |
07:08 | Mynta, type ia u code kumba la pyni. |
07:13 | Hangne, ngi call ia ka addVariables function ryngkat ki parameters 10 bad 20. |
07:21 | Ki values ba lah pynphai na ka function lah shim bad buh ha ki variables $var1, $var2 and $addition. |
07:31 | Kane ka function ka leh ia ka addition bad ka pynphai ia ki parameters ba lah passed bad ka jubab ba mih. |
07:42 | Kane ka dur ka batai kumno ngi lah ban pynphai ia u array na ka function. |
07:53 | Ha kajuh ka rukom, kane ka batai kumno u hash lah ban pynphai na ka function. |
08:00 | Save ia ka file jong phi. |
08:03 | Mynta to ngin ia execute ia ka Perl script ha ka terminal da kaba type: |
08:10 | perl funcWithMultipleRtrnVals dot pl |
08:18 | bad shon Enter. |
08:20 | Ka output ka long kumba la pyni ha ka terminal. |
08:32 | Ka Perl ka ai bun tylli ki inbuilt functions. |
08:36 | Ngi lah pule katto katne na ki ha ki jinghikai ba hashwa. Kum ka nuksa- arrays, Hash, sort, scalar, each, keys bad kiwei kiwei. |
08:49 | Ban call ia ki inbuilt functions ka ia syriem ha ka ban call ia kiwei ki function kaba ngi batai. |
08:57 | Kum ka nuksa sort open bracket @arrayName close bracket semicolon. |
09:04 | Pyrshang ban leh ia katto katne ki inbuilt functions ha ka sample program kaba ngi lah pyndonkam. |
09:10 | Bad peit ia ki outputs jong ki. |
09:13 | To ngin ia batai kyllum. |
09:15 | Ha kane ka jinghikai, ngi la pule ia ka: |
09:17 | functions ha ka Perl |
09:19 | functions ryngkat ki arguments bad |
09:22 | functions kaba pynphai ia ki values da kaba pyndonkam ia ki sample programs. |
09:27 | Hangne ka kam na ka bynta jong phi: |
09:29 | Thoh ia ka function kaba shim 3 tylli ki arguments. |
09:33 | Leh katto katne ki kam ha kine ki arguments. |
09:37 | Return ia ka jingmih na kine ki kam ba phi leh ha ka arguments bad print ia ka. |
09:43 | Peit ia video kaba don ha ka link harum. |
09:47 | Ka kyllum lang ia ka Spoken Tutorial project. |
09:51 | Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien. |
09:56 | Ka kynhun jong ka Spoken Tutorial project: * Ka pynlong ia ki workshops da kaba pyndonkam ia ki spoken tutorials. |
10:02 | Ka ai certificates sha kito kiba pass ha ka online test. |
10:07 | Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka: contact at spoken hyphen tutorial dot org. |
10:14 | "Spoken Tutorial" project kadei shi bynta jong ka "Talk to a Teacher" project |
10:19 | La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India. |
10:28 | Kham bun ki jingtip halor kane ka mission kidon ha ka: spoken hyphen tutorial dot org slash NMEICT hyphen Intro. |
10:40 | Kyrmen phi sngewtynnad ia kane ka jinghikai halor ka Perl |
10:43 | Ma nga u Pdiangburom na Shillong, nga pynkut ia kane. |
10:46 | Khublei shibun. |