PERL/C3/Including-files-or-modules/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Khublei ngi pdiangsngewbha iaphi sha ka Spoken Tutorial halor ka Including files or modules ha ka PERL program.
00:08 Ha kane ka jinghikai, ngin ia pule ban pyndonkam ia ka:

do use bad require methods ha ka PERL programming.

00:16 Na ka bynta kane ka jinghikai, nga pydonkam da ka:

Ubuntu Linux 12.04 operating system Perl 5.14.2 bad gedit Text Editor.

00:28 Phi lah ban pyndonkam kano kano ka text editor katkum kamon jong phi.
00:32 Ban bud ia kane ka jinghikai, phi dei ban don ia ka jingtip jong ka Perl programming.
00:37 Lada phim don, te leit sha ki spoken tutorials jong ka Perl ha ka spoken tutorial website.
00:44 'do()' method: kine kidei ki lynti kiba suk ban kynthup ia ka tynrai jong u code na kiwei ki files hapoh jong ka script file ba mynta.
00:53 To ngin ia pyrshang ban sngewthuh ia ka do() method.
00:57 Plie ia ka file ba thymmai ha ka text editor jong phi bad jer kyrteng ia ka kum ka datetime dot pl.
01:03 Ha ka datetime dot pl file, type ia u code harum kumba lah pyni ha ka screen.
01:09 Nangne shakhmat, kynmaw ban shon ia u Enter key ha man ka command ha ka terminal.
01:15 To mynta ngin ia pyrshang ban sngewthuh ia u code.
01:18 Ka tarik bad kapor ba mynta lah buh ha u variable dollar datestring.
01:23 Hangne, nga don ia ka function kaba kyrteng "msgThanks" kaba pynphai ia ka khubor “Thank you”.
01:31 Mynta, shon Ctrl+S ban save ia ka file.
01:35 Hadien kane, to ngin ia peit ia kawei pat ka Perl program kaba kan sa pyndonkam ia kane ka file datetime dot pl.
01:43 Plie ia ka file ba thymmai ha ka text editor jong phi bad jer kyrteng ia ka kum main dot pl.
01:49 Ha ka main dot pl file, type ia u code harum kumba la pyni ha ka screen.
01:55 To mynta ngan batai ia u code.
01:58 Hangne, ka lain ba nyngkong kan print ia ka khubor welcome.
02:03 La khot ia ka 'do()' method ryngkat ka filename na ka jaka ba ngi kwah ban pyndonkam ia u code.
02:09 Ka tarik bad kapor ba mynta lah buh ha ka $datestring variable jong ka datetime dot pl file.
02:16 Bad ha kaba kut, ngi khot ia ka msgThanks() function na kajuh ka file.
02:21 Mynta, shon Ctrl+S ban save ia ka file.
02:25 To ngin ia execute ia ka program.
02:27 Phai biang sha ka terminal bad type: perl main dot pl bad shon Enter.
02:34 Peit ia ka output ha ka terminal.
02:37 Hadien kane, ngin ia pule kumno ban pyndonkam ia ka require() method bad use() method ha ka Perl program.
02:44 Kine ki methods lah pyndonkam – ynda ngi don bun ki subroutines kiba ngi lah ban pyndonkam ha ki bun tylli ki Perl programs.
02:52 use() method lah pyndonkam tang na ka bynta ki modules.
02:56 Lah pynshisha ia ka ha kapor jong ka compilation.
02:59 Ym donkam ban ai ia ka file extension.
03:03 require() method lah pyndonkam na ka bynta baroh ar ki Perl programs bad modules.
03:08 Lah pynshisha ia ka ha kapor ba run.
03:10 Uno uno u donkam ban ai ia ka file extension.
03:14 Ka syntax jong ka use method kadei : use module name semicolon.
03:20 Perl modules kidei ki files kiba kut da u '.pm' extension.
03:25 Ka jingpyndonkam biang ia u code lah pyntreikam lyngba ki modules.
03:30 Kine ki ia syriem bad ki libraries ha kiwei ki (computer) languages.
03:35 Mynta, ngan pyni iaphi ia ka simple program ryngkat ka use method ban kynthup ia ka module ha ka Perl code.
03:43 Plie ia file ba thymmai ha ka text editor jong phi bad jer kyrteng ia ka kum sum dot pm.
03:49 Ha ka sum dot pm file, type ia u code harum kumba lah pyni ha ka screen.
03:55 Hangne, nga don ia ka simple function ka ban khein ia ka sum jong ki set jong ki numbers ba lah ai.
04:01 Mynta, shon Ctrl+S ban save ia ka file.
04:05 Ngin ia thoh ia kawei pat ka Perl script ha kaba ngin sa ia pyndonkam ia kane ka sum dot pm file.
04:11 To ngan plie ia ka sample program app dot pl file kaba nga lah dep save lypa.
04:17 Ha ka app dot pl file, type ia u code harum kumba la pyni ha ka screen.
04:22 To mynta ngan batai ia u code.
04:25 Ka lain ba nyngkong ka pyni ia ka use method bad ka kyrteng jong ka module.
04:29 Ha ka bynta jong ngi, ka kyrteng jong ka module kadei 'sum'.
04:33 Ngi ia pass 1, 7, 5, 4, 9 kum ki input parameters sha ka function total() ha ka sum dot pm file.
04:44 Sa shisien, ha u lain uba bud, ngi ia pass 1 haduh 10 kum ki input parameters sha kajuh ka function.
04:52 Mynta, shon Ctrl+S ban save ia ka file.
04:56 To ngin ia execute ia ka program.
04:59 Phai biang sha ka terminal bad type: perl app dot pl bad shon Enter.
05:06 Peit ka output kaba paw ha ka terminal.
05:10 To ngin ia peit sa katto katne ki options ha ka use method. Phai biang sha ka sum dot pm ha ka text editor.
05:18 Ha kaba sdang jong ka source code, pyndap ia ki lain "use strict" semicolon, "use warnings" semicolon.
05:27 "use strict" bad "use warnings" kidei ki compiler flags kiba batai ia ka Perl ban long ha ka rukom ba pyrkhing.
05:35 Kine lah pyndonkam ban lait na ki jingbakla kiba shait jia ha ka programming.
05:39 use strict ka ban jur ia u nongpyndonkam ban declare ia baroh ki variables kiba lah pyndonkam ha ka program.
05:45 Lada don ki errors, use strict kan sa pynkut ia ka execution.
05:50 use warnings kan pyni tang ia ka jingmaham hynrei kan bteng ia ka execution.
05:56 Mutdur ba ngi lah klet ban declare ia u variable$sum kum my.
06:02 To mynta ngin ia peit kumno kajuh ka program kan execute.
06:06 Shon Ctrl+S ban save ia ka file.
06:09 Phai biang sha ka terminal bad type: perl app dot pl.
06:15 Ngi lah ban iohi ba ka program ka lah sangeh khlem da execute ia ka result.
06:21 Ka set kaba nyngkong jong ki lain ba pyni ha ka terminal kidei error messages ba la sei da ka “use strict”.
06:29 Ki ar tylli kiba hadien kidei ki abort messages.
06:32 Te, kane kadei kumno ba ka use method options ka treikam.
06:36 Hadien kane, to ngin ia peit ia ka Perl program ha kaba ngi pyndonkam ia ka require method.
06:41 To ngan plie ia ka sample program commonfunctions dot pl kaba nga lah dep saved lypa.
06:48 Type ia u code harum kumba lah pyni ha ka screen ha ka commonfunctions dot pl file jong phi. To ngin ia pyrshang ban sngewthuh mynta ia u code.
06:57 Hangne, ngi lah ban iohi ia ka kynhun jong ki functions kiba shait kham pyndonkam.
07:01 Kane ka function, square(), ka pynphai ia u square jong u number.
07:06 Ka function ba ar, square underscore root(), ka pynphai ia ka square root jong u number ba lah ai.
07:12 Ka function kaba bud, random underscore number(), ka pynmih ia u random number.
07:18 Ka function ba khatduh random underscore range(), ka pynmih ia u random number hapdeng u lower range bad upper range jong ki numbers.
07:26 Kynmaw ba ngi donkam ia u 1 semicolon (1;) ha bakut jong ka file.
07:31 Kane kadei namar ba ka Perl ka donkam ia ka expression ba khatduh ha ka file ban pynphai ia u true value.
07:37 Mynta, shon Ctrl+S ban save ia ka file.
07:41 Hadien kane, ngin ia thoh ia ka Perl program ha kaba ngin ia call ia kine ki subroutines da kaba pyndonkam ia ka "require" method.
07:48 To ngan plie ia ka sample program callprogram dot pl kaba nga lah dep save lypa.
07:54 Type ia u code harum kumba lah pyni ha ka screen ha ka file jong phi. To mynta ngan batai ia u code.
08:02 Ka require ka read ia ka commonfunctions dot pl file, kaba don ia u Perl code, bad ka lum thup ia ka.
08:09 Kane ka program ka ai 4 tylli ki options ia u nongpyndonkam. U nongpyndonkam u hap ban jied kawei ka option ha ka shi sien leh.
08:17 1: (one) udei ban it ka square jong u number.
08:20 2: Two udei na ka bynta u square root jong u number.
08:23 3: Three udei na ka bynta u random number ha ka range ba lah ai. 4: Four udei ban iehnoh ia ka program.
08:29 Lada lah type ia ka option 1(one), kan sa pan na u nongpyndonkam ban pyndap ia u number.
08:34 U value lah buh ha ka $number. U value lah pass sha ka function square() ha ka commonfunctions dot pl file.
08:44 Ka function ka pynphai ia u square jong u number.
08:47 Ka 'print statement ka print ia u square jong u number kum ka output.
08:52 Lada lah type ia ka option 2(two), u square root jong u number u paw kum ka output.
08:58 Ka execution ka bud kumba lah batai ha ka function kaba hashwa square().
09:03 Lada lah type ia ka option 3 (three), u random numbers u paw kum ka output ha ka range ba lah ai.
09:09 Lymda kumta, lada ka option kadei 4 (four), ka program ka kut noh. Lada kano kano ka option lait na kaba lah kdew ka ai, ka print statement kan ong “Incorrect option”.
09:20 Kynmaw ba ha kane ka program, ngi lah call tang lai na saw tylli ki function na ka commonfunctions dot pl.
09:28 Mynta, shon Ctrl+S ban save ia ka file.
09:31 To ngin ia executeia ka program.
09:34 Phai biang sha ka terminal bad type: perl callprogram dot pl.
09:41 Peit ia ka output.
09:44 Ngan sa execute ia ka program sa shisien da kawei pat ka option.
09:49 Type: perl callprogram dot pl.
09:53 Mynta, pyndap ia ka option kum 3.
09:56 Enter a lower range kum 50.
09:59 Enter a upper range kum 99.
10:02 Ngi lah ban iohi ia u random number ba u lah pynmih ha ka range ba lah ai jong ki numbers.
10:08 Pyrshang dalade ia kiwei pat ki options.
10:11 Da kane ngi lah poi sha kaba kut jong kane ka jinghikai. To ngin ia batai kyllum.
10:16 Ha kane ka jinghikai, ngi lah pule kumno ban pyndonkam ia ka:

do use require methods ha ka PERL programming.

10:24 Kynmaw: "use" module lah ai jingmut ban ia ka "require" module, namar ba ka ai ia ki jingdon ki module ha ka compile time.
10:33 Hangne ka kam na ka bynta jong phi. Thoh ia ka Perl program reminder.pl ha kaba phin sa thoh ia ka shithi sha ki nongiashim bynta.
10:41 Prompt sha u nongpyndonkam ban pyndap ia ka kyrteng To bad From.
10:45 Call ia ki subroutines na ka Letter dot pm da kaba pyndonkam ‘use’ method.
10:50 Thoh ia ki functions harum ha ka Letter dot pm file.
10:54 LetterDate() function ka pynphai ia ka tarik bad kapor ba mynta.
10:58 To() function ka pynphai ia ka kyrteng jong ki nongiashim bynta.
11:02 From() function ka pynphai ia ka kyrteng jong u nongphah.
11:05 Lettermsg() function ka pynphai ia ki contents jong ka shithi.
11:09 Thanksmsg() function ka pynphai "thanks" bad "regards".
11:13 Ka output kadei ban paw kumba la pyni.
11:20 Ka video ha ka link harum ka kyllum lang ia ka spoken tutorial project. Sngewbha download bad peit ia ka.
11:27 Ka kynhun jong ka Spoken Tutorial Project:

Ka pynlong ia ki workshops da kaba pyndonkam ia ki spoken tutorials bad Ka ai certificates sha kito kiba pass ha ka online tests.

11:36 Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ngi.
11:40 Ia ka Spoken Tutorial project la bei tyngka da ka NMEICT, MHRD, Sorkar India.

Kham bun ki jingtip halor kane ka mission kidon ha kane ka link.

11:51 Ma nga u Pdiangburom na Shillong, nga pynkut ia kane. Khublei shibun.

Contributors and Content Editors

Pdiangburom