Difference between revisions of "PERL/C3/Sample-PERL-program/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(10 intermediate revisions by one other user not shown)
Line 15: Line 15:
 
|00:14
 
|00:14
 
| આ ટ્યુટોરીયલ રિકોર્ડ કરવા માટે હું ઉપયોગ કરી રહી છુ.
 
| આ ટ્યુટોરીયલ રિકોર્ડ કરવા માટે હું ઉપયોગ કરી રહી છુ.
* '''Ubuntu Linux 12.04''' ઓપરેટીંગ સીસ્ટમ  
+
'''Ubuntu Linux 12.04''' ઓપરેટીંગ સીસ્ટમ, '''Perl 5.14.2''' અને '''gedit''' ટેક્સ્ટ એડિટર.
* '''Perl 5.14.2''' અને  
+
* '''gedit''' ટેક્સ્ટ એડિટર.
+
 
|-
 
|-
 
|00:25
 
|00:25
Line 46: Line 44:
 
|-
 
|-
 
| 01:08
 
| 01:08
| The same code files are available under this video on our website.  
+
| આપણી વેબ સાઈટ પર આ વિડીઓમાં તેજ કોડ ફાઈલ ઉપલબ્ધ છે.
  
 
|-
 
|-
 
|01:13
 
|01:13
|Download and unzip the files provided in the code file link.
+
|કોડ ફાઈલ લીંકમાં આપેલ ફાઈલસ ને ડાઉનલોડ અને અનઝિપ કરો.
  
 
|-
 
|-
 
|01:18
 
|01:18
|Now, let us see our sample '''Perl '''program '''Weather dot pm.'''
+
| હવે આપણું પર્લ પ્રોગ્રામ  '''Weather dot pm.''' જોઈએ.
  
 
|-
 
|-
 
|01:24
 
|01:24
|The block of code in this program is under the '''namespace Weather'''.
+
| આ પ્રોગ્રામમાં કોડ નું બ્લોક  '''namespace Weather'''. માં છે.
  
 
|-
 
|-
 
|01:29
 
|01:29
|'''Perl '''implements '''namespace '''using the''' package''' keyword.
+
| પર્લ પેકેજ કીવર્ડ ઉપયોગ કરીને '''namespace ''' અમલીકરણ કરે છે.
  
 
|-
 
|-
 
|01:34
 
|01:34
|'''BEGIN''' block is compiled and executed before the '''main''' program.
+
|'''BEGIN''' બ્લોક  '''main''' પ્રોગ્રામ થી પહેલા કમ્પાઈલ અને એક્ઝીક્યુટ કરાવાય છે.  
  
 
|-
 
|-
 
|01:40
 
|01:40
|'''Export''' allows to export the '''functions''' and variables of '''modules''' to user's '''namespace'''.
+
|'''Export''' યુઝરના  '''namespace''' પર મોડ્યુલસ ના વેરીએબલ અને ફંકશન ને એક્સપોર્ટ કરવાની પરવાનગી આપે છે.
  
 
|-
 
|-
 
|01:48
 
|01:48
|'''At the rate EXPORT''' and''' at the rate EXPORT underscore OK''' are the two main variables used during '''export''' operation.
+
|'''At the rate EXPORT''' અને ''' at the rate EXPORT underscore OK''' એક્સપોર્ટ ઓપરેશન ના દરમિયાન ઉપયોગ થયેલ બે મેઈન વેરીએબલસ છે
  
 
|-
 
|-
 
|01:57
 
|01:57
|'''At the rate EXPORT''' contains list of '''subroutines''' and variables of the '''module.'''
+
|'''At the rate EXPORT''' સબરૂટીન ની યાદી અને મોડ્યુલ ના વેરીએબલસ ધરાવે છે.
  
 
|-
 
|-
 
|02:03
 
|02:03
|These will be exported into the caller '''namespace.'''
+
| આ કોલર '''namespace.''' માં એક્સપોર્ટ કરાવશે.
  
 
|-
 
|-
 
|02:07
 
|02:07
|'''At the rate EXPORT underscore OK''' does export of symbols on demand basis.
+
|'''At the rate EXPORT underscore OK''' જરૂરિયાત અનુસાર સિમ્બોલને એક્સપોર્ટ કરે છે.
  
 
|-
 
|-
 
|02:14
 
|02:14
|Here, I have used''' references''' to create complex data-structures to hold the data required for a weather report.
+
| અહી હવામાનના  રીપોર્ટ માટે જરૂરી ડેટા રાખવા માટે કોપ્લેક્સ ડેટા- સ્ટ્રક્ચર બનાવવા માટે મેં ''' references''' ઉપયોગ કર્યું છે.
  
 
|-
 
|-
 
|02:24
 
|02:24
|'''$weather_report''' is a''' hash reference'''. “'''place'''” and “'''nstate'''” have the scalar values.
+
|'''$weather_report''' ''' hash reference''' છે . “'''place'''” અને  “'''nstate'''” સ્કેલ વેલ્યુ ધરાવે છે.
  
 
|-
 
|-
 
|02:32
 
|02:32
|“'''weekly'''” is '''hash''' of''' hash references'''.
+
|“'''weekly'''” એ  ''' hash references''' નું હેશ છે.
  
 
|-
 
|-
 
|02:37
 
|02:37
|*Each week day has four '''keys''' -  
+
|'''keys''' - અઠવાડિયા પ્રત્યેક દિવસ ચાર કી  ધરાવે છે.
 
+
'''max underscore temp''', '''min underscore temp''', '''sunrise''', '''sunset.'''
  '''max underscore temp''',  
+
  '''min underscore temp''',  
+
  '''sunrise''',
+
  '''sunset.'''
+
  
 
|-
 
|-
 
|02:48
 
|02:48
|“'''record underscore time'''” is an''' array reference''' with two '''index''' values.
+
|“'''record underscore time'''” બે ઇન્ડેક્સ વેલ્યુના સાથે એક ''' array reference''' છે.
  
 
|-
 
|-
 
|02:54
 
|02:54
|I have a few '''subroutines''' to display the weather report of various options.  
+
|   મારો પાસે વિવિધ વિકલ્પોના હવામાનના રીપોર્ટ ને દેખાડવા મતે અમુક સબરૂટીન છે. એકે-એક કરીને તેને જોઈએ.  
Let us see one by one.
+
  
 
|-
 
|-
 
|03:01
 
|03:01
|This '''function''' prints the '''header''' information such as header of the report, place, state and current date.
+
| આ ફંકશન હેડર જાણકારી જેમકે ''' report, place, state અને  current date.''' ના હેડરને પ્રિન્ટ કરે છે.
  
 
|-
 
|-
 
|03:10
 
|03:10
|Now, let us see the next function''' display underscore daily underscore report.'''
+
| હવે આગળનું ફંકશન ''' display underscore daily underscore report.''' દેખાડે છે.
  
 
|-
 
|-
 
|03:16
 
|03:16
|This '''function '''prints the daily report on the screen, depending upon the weekday input.
+
| આ ફંકશન ''' weekday input.''' ના આધાર પર સ્ક્રીન પર દૈનિક રીપોર્ટ પ્રિન્ટ કરે છે.
  
 
|-
 
|-
 
|03:22
 
|03:22
| We retrieve the parameter passed into a '''subroutine''' using the''' shift''' function.
+
| આપણે ''' shift''' ફંકશન પ્રયોગ કરીને  '''subroutine''' માં પાસ કરેલ પેરામીટર ને ફરી: મેળવીએ છીએ.
 
+
 
|-
 
|-
 
|03:27
 
|03:27
|I have used the''' trim() '''function to remove the leading and trailing spaces of the '''parameter''' value.
+
| મેં પેરામીટર વેલ્યુના મુખ્ય અને અનુગામી સ્પેસે ને કાઢવા માટે ''' trim() ''' ફંકશન નો ઉપયોગ કર્યો છે.
  
 
|-
 
|-
 
|03:34
 
|03:34
| Here is the code for the '''trim()''' function.
+
| અહી '''trim()''' ફંકશન માટે કોડ છે.
  
 
|-
 
|-
 
|03:37
 
|03:37
| '''Lc()''' function returns a lowercase version of the given input.
+
| '''Lc()''' ફંકશન આપેલ ઈનપુટનું લોવરકેસ વર્જન રીટર્ન કરે છે.
  
 
|-
 
|-
 
|03:42
 
|03:42
|This is used to avoid case-sensitivity.
+
| આ કેસ ''' case-sensitivity.'''  થી રોકવા માં ઉપયોગ થાય છે.
  
 
|-
 
|-
 
|03:45
 
|03:45
| The 'week day'- passed as parameter from the main program, is assigned to a local variable '''dollar week underscore day'''.
+
| '''week day'''  મેઈન પ્રોગ્રામથી પેરામીટર ની જેમ પાસ થયેલ જે લોવર વેરીએબલ  '''dollar week underscore day''' પર અસાઇન થાય છે.
  
 
|-
 
|-
 
|03:55
 
|03:55
| The following '''print statement'''s will print the data corresponding to a specified week day.
+
| આપેલ પ્રિન્ટ સ્ટેટમેન્ટ નિર્દિષ્ટ ''' week day.''' થી સબંધિત ડેટાને પ્રિન્ટ કરશે.
  
 
|-
 
|-
 
|04:01
 
|04:01
| We are using the '''arrow operator''' to''' dereference''' a value in '''$weather underscore report'''.
+
| આપણે  '''$weather underscore report''' માં એક વેલ્યુ ને ''' dereference''' કરવા માટે એરો ઓપરેટર ઉપયોગ કરી રહ્યા છીએ.
  
 
|-
 
|-
 
|04:09
 
|04:09
| When working with '''references''', we have to understand the '''data type '''we are '''dereferencing'''.
+
| જયારે રેફરેન્સ ના સાથે કાર્ય થયી રહ્યો છે તો આપણે  '''data type ''' ને સમઝાવાવાનું છે જે આપણે  '''dereferencing''' કરી રહ્યા છીએ.
  
 
|-
 
|-
 
|04:15
 
|04:15
| If it is a '''hash''', we need to pass the '''key '''in curly braces.
+
|   જો આ એક હેશ છે તો આપણને છગડીયો  કૌંસ માં '''key ''' પાસ કરવાની જુરીયાત છે.
  
 
|-
 
|-
 
|04:20
 
|04:20
| If it is an '''array,''' we need to use the square brackets with the '''index value'''s.
+
|   જો આ એક એરે છે તો આપણેને '''index values''' ના સાથે ચોરસ કૌંસ ઉપયોગ કરવાની જુરીયાત છે.
  
 
|-
 
|-
 
|04:26
 
|04:26
| '''return''' function of '''Perl''' returns a value.
+
| પર્લનું રીટર્ન ફંકશન એક વેલ્યુ રીટર્ન કરે છે.
  
 
|-
 
|-
 
|04:29
 
|04:29
|This can be used to check the status of the '''function''' in the '''main''' program.
+
| આ મેઈન પ્રોગ્રામમાં '''function'' સ્ટેટ્સ ને તપાસવા માટે ઉપયોગ કરી શકાય છે.
  
 
|-
 
|-
 
|04:36
 
|04:36
|The next '''function''' is''' write underscore daily underscore report.'''
+
| આગલું ફંકશન ''' write underscore daily underscore report.''' છે.
  
 
|-
 
|-
 
|04:40
 
|04:40
  
|This '''function''' will print the '''report output''' to a file.
+
| આ ફંકશન ફાઈલ પર રીપોર્ટ આઉટ પુટ પ્રિન્ટ કરશે.
  
 
|-
 
|-
 
|04:45
 
|04:45
|The''' open''' function with the greater than (>) symbol defines the''' WRITE''' mode.
+
| ગ્રેટર ધેન  (>) સિમ્બોલ ના સાથે ઓપન ફંકશન ''' WRITE''' મોડ વ્યાખ્યાયિત કરે છે.
  
 
|-
 
|-
 
|04:50
 
|04:50
|Filename is created with the weekday name and '''dot txt '''extension.
+
| ''' weekday ''' ના નામ અને '''dot txt ''' એક્સટેન્શન ના સાથે ફાઈલ નું નામ બને છે.
  
 
|-
 
|-
 
|04:56
 
|04:56
|The '''print statements''' will print the corresponding data of a specified week day to a file.
+
|   પ્રિન્ટ સ્ટેટમેન્ટ ફાઈલ પર નિર્દિષ્ટ ''' weekday ''' થી સમ્બન્ધિત ડેટા પ્રિન્ટ કરશે.
  
 
|-
 
|-
 
|05:02
 
|05:02
|This prints the weekly report.
+
| આ વીકલી રીપોર્ટ ને પ્રિન્ટ કરે છે.
  
 
|-
 
|-
 
|05:05
 
|05:05
|I have declared a '''foreach loop''' to loop through each weekday of the''' hash reference'''.
+
| મેં ''' hash reference''' ના દરેક  ''' weekday ''' ને લૂપ કરવા માટે એક '''foreach loop''' ડીકલેર કર્યું છે.
  
 
|-
 
|-
 
|05:11
 
|05:11
|I have used curly brackets to represent the''' hash reference'''  and the '''arrow '''operator to''' dereference'''.
+
| મેં ''' hash reference'''  ને દેખાડવા માટે છગડીયો  કૌંસ અને ''' dereference''' ના માટે એરો ઓપરેટર ઉપયોગ કર્યો છે.
  
 
|-
 
|-
 
|05:18
 
|05:18
| I am using the''' “keys” in-built function '''to loop through the '''keys '''of the '''hash'''.
+
| હું હેશ ની કી ને લૂપ ક્ર્વ્ક માટે ''' “keys” in-built function ''' ઉપયોગ કરી રહી છું.
  
 
|-
 
|-
 
|05:23
 
|05:23
| '''display underscore daily underscore report function '''will print each element of the '''hash'''.
+
| '''display underscore daily underscore report function ''' હેશ દરેક એલિમેન્ટ ને પ્રિન્ટ કરશે.
  
 
|-
 
|-
 
|05:30
 
|05:30
|Now, let us see - a '''Perl '''program '''weather underscore report dot pl ''' where we will make use of this '''module '''file '''Weather dot pm'''.
+
| હવે પર્લ પ્રોગ્રામ  '''weather underscore report dot pl ''' જોઈએ જ્યાં આપણે આ મોડ્યુલ ફાઈલ '''Weather dot pm''' નો ઉપયોગ કરીશું.
  
 
|-
 
|-
 
|05:40
 
|05:40
|Here, '''use strict''' and''' use warnings''' are compiler flags that help to avoid common programming mistakes.
+
| અહી  '''use strict''' અને ''' use warnings''' કમ્પાઈલ ફ્લેગ્સ છે જે સામાન્ય પ્રોગ્રામિંગ ની ભૂલોથી બચવા માટે મદદ કરે છે.
  
 
|-
 
|-
 
|05:48
 
|05:48
| '''use Weather''' semicolon. Here, '''Weather '''is a''' module''' name which I have used in this program.
+
| '''use Weather''' સેમીકોલન.અહી  '''Weather ''' એક મોડ્યુલ નામ છે જે મેં આ પ્રોગ્રામમાં ઉપયોગ કર્યો છે.
  
 
|-
 
|-
 
|05:56
 
|05:56
|We have already seen that the functions required for this program have been stored in this''' module'''.
+
| આપણે પહેલા જ જોયું કે આ પ્રોગ્રામ ના માટે આવશ્ક ફંકશન આ મોડ્યુલ માં સંગ્રહ કર્યું છે.
  
 
|-
 
|-
 
|06:03
 
|06:03
|It is not required to give the'''  dot pm''' file extension here.
+
| અહી'''  dot pm''' ફાઈલ  એક્સટેન્શન આપવાની જરૂરત નથી.
  
 
|-
 
|-
 
|06:08
 
|06:08
|In this program, I'll print different reports depending upon the given options.
+
| આ પ્રોગ્રામમાં હું આપેલ વિકલ્પો ના આધાર પર વિવિધ રીપોર્ટસ પ્રિન્ટ કરીશ.
  
 
|-
 
|-
 
|06:14
 
|06:14
|The user has to enter an option to print the  daily weather report of a particular week day,
+
|   આપેલ ને પ્રિન્ટ કરવા માટે યુઝરને એક વિકલ્પ ઉમેરવું પડશે.
daily weather report of a particular week day to an output fileweekly weather report.
+
વિશેષ વિકડે ની દૈનિક હવામાન રીપોર્ટઆઉટપુટ ફાઈલ માં  વિશેષ વિકડે ની દૈનિક હવામાન રીપોર્ટ,  સાપ્તાહિક હવામાન રીપોર્ટ
  
 
|-
 
|-
 
|06:27
 
|06:27
|If option '1' is typed, it will ask the user to enter the day of a week.
+
| જો વિકલ્પ '1' ટાઈપ થાય છે તો યુઝર થી અઠવાડિયાનો એક દિવસ ઉમેરવા માટે કહેશે.
  
 
|-
 
|-
 
|06:32
 
|06:32
|The '''diamond '''operator will read from''' STDIN''', that is, from the keyboard.
+
| '''diamond '''ઓપરેટર ''' STDIN''', થી વાંચશે જે એક કીબોર્ડ છે.  
  
 
|-
 
|-
 
|06:38
 
|06:38
|For example, if the user enters ''''monday'''', then it is assigned to a variable '''dollar dayoption, '''which is a''' local variable'''.
+
| ઉદાહરણના માટે જો યુઝર ''''monday'''' ઉમેરે છે તો આ વેરીએબલ '''dollar dayoption, ''' પર અસાઇન થાય છે જે એક લોકલ વેરીએબલ છે.
  
 
|-
 
|-
 
|06:47
 
|06:47
|Next, we can see that we are calling two functions-
+
|આગળ આપણે જોઈ શકીએ છીએ કે  બે ફંકશન કોલ કરી રહ્યા છે- ''' display_header()''' અને ''' display_daily_report().'''
*''' display_header()''' and
+
*''' display_daily_report().'''
+
  
 
|-
 
|-
 
|06:56
 
|06:56
|We have exported all functions in '''Weather dot pm''' with “'''use Weather'''” statement in this file.
+
| આપણે આ ફાઈલમાં  “'''use Weather'''”  સ્ટેટમેન્ટ ના સાથે '''Weather dot pm'' માં બધા ફંકશન ને એક્સપોર્ટ કર્યું છે.
  
 
|-
 
|-
 
|07:03
 
|07:03
|So, no need to refer the functions within a package using the '''colon colon (::)package qualifier'''
+
| તો ''colon colon (::)package qualifier''' ઉપયોગ કરીને એક પેકેજમાં ફંકશન ને જોવા ની જરૂરિયાત નથી.
  
 
|-
 
|-
 
|07:10
 
|07:10
|Now let's see the next option.
+
| ચાલો હવે આગળનો વિકલ્પ જોઈએ.
  
 
|-
 
|-
 
|07:13
 
|07:13
|If option '2' is typed, it will prompt the user to enter the day of a week.
+
| જો વિકલ્પ  '2' ટાઈપ કરાવાય તો યુઝર તો યુઝર થી અઠવાડિયાના દિવસને ઉમેરવા માટે કહેશે.
  
 
|-
 
|-
 
|07:19
 
|07:19
|'''$dayoption''' is passed as the input parameter to the '''function write underscore daily underscore report.'''
+
|'''$dayoption''' એ  '''function write underscore daily underscore report.'''ફંકશન પર ઈનપુટ પેરામીટર  ની જેમ પાસ પાસ કરવામાં આવે છે.
  
 
|-
 
|-
 
|07:27
 
|07:27
| '''return '''value from the function is stored in the variable '''dollar result'''.
+
| ફંકશન '''return ''' વેલ્યુ  '''dollar result''' વેરીએબલમાં સન્ગ્ર થાય છે .
  
 
|-
 
|-
 
|07:33
 
|07:33
| '''Print statement''' asks the user to check the text file for the output.
+
| પ્રિન્ટ સ્ટેટમેન્ટ આઉટપુટ ના માટે ટેક્સ્ટ ફાઈલ તપાસવા માટે યુઝરથી પૂછે છે.
  
 
|-
 
|-
 
|07:38
 
|07:38
|The filename is created with the day of the week '''dot txt''' as output file.
+
| '''dot txt''' આઉટપુટ ફાઈલને જેમ અઠવાડિયાના દિવસ અઠે ફાઈલનું નામ બનાવવામાં આવે છે.  
  
 
|-
 
|-
 
|07:46
 
|07:46
|If option '3' is typed, it prints the weather report for the whole week.
+
| જો વિકલ્પ '3' હોય છે તો આ પૂર્ણ અઠવાડિયા ના માટે હવામાન રીપોર્ટ પ્રિન્ટ કરે છે.
  
 
|-
 
|-
 
|07:51
 
|07:51
| '''display underscore weekly underscore report''' is the '''function''' name of the weekly report.
+
| '''display underscore weekly underscore report''' સ્પ્તાહીક રીપોર્ટ નું ફંકશન નામ છે.
  
 
|-
 
|-
 
|07:57
 
|07:57
| This '''print''' statement draws a horizontal line for the specified number of times.
+
|   પ્રિન્ટ સ્ટેટમેન્ટ સમયની નિર્ધારિત સંખ્યાના માટે આડી લાઈન બનાવે છે.
  
 
|-
 
|-
 
|08:02
 
|08:02
|This is just to give a good look to the report.
+
| આ ફક્ત રીપોર્ટને એક સારું રૂપ આપવા માટે છે.
  
 
|-
 
|-
 
|08:06
 
|08:06
|Lastly, if the option is 4, it will quit the program.
+
| છેલ્લે; જો વિકલ્પ ''' 4,''' હોય તો આ પ્રોગ્રામને છોડી દેશે.
  
 
|-
 
|-
 
|08:11
 
|08:11
|If any option other than the ones specified is given, the print statement says “'''Incorrect option'''”.
+
| જો આપેલ નિર્ધારિત વિકલ્પોના બદલે કોઈ અન્ય વિકલ્પ છે  તો પ્રિન્ટ સ્ટેટમેન્ટ કહેશે  “'''Incorrect option'''”  
  
 
|-
 
|-
 
|08:19
 
|08:19
|Here, the exit value of '0' indicates the program ran successfully.
+
| અહી '0' ની એક્ઝીટ વેલ્યુ દેખાય છે કે પ્રોગ્રામ સફળતા પૂર્વક રન થયું.  
  
 
|-
 
|-
 
|08:25
 
|08:25
|The exit value other than '0' means an error of some kind has occurred.  
+
|   '0' ના બદલે એક્ઝીટ વેલ્યુનો અર્થ છે કે કોઈ પ્રકારની એરર આવી છે.
  
 
|-
 
|-
 
|08:31
 
|08:31
|Now, let us execute the program.
+
| ચાલો પ્રોગ્રામને એક્ઝીક્યુટ કરીએ.
  
 
|-
 
|-
 
|08:34
 
|08:34
|Switch to the '''terminal '''and type '''perl weather underscore report dot pl''' and press''' Enter'''.
+
| ટર્મિનલ પર જાવ અને ટાઈપ કરો '''perl weather underscore report dot pl''' અને એન્ટર દબાવો.
  
 
|-
 
|-
 
|08:41
 
|08:41
|We can see four options on the screen.
+
|આપણે સ્ક્રીન પર ચાર વિકલ્પો જોઈ શકીએ છીએ.
  
 
|-
 
|-
 
|08:45
 
|08:45
|Type '1 'and press '''Enter.'''
+
| અને '''1 ''' ટાઈપ કરો અને  દબાવો.
  
 
|-
 
|-
 
|08:48
 
|08:48
|We are prompted to enter a day of the week. I'll type "monday" and press '''Enter'''.
+
| આપણે અઠવાડિયાના એક દિવસ ઉમેરવા માટે કહેવામાં આવે છે. હું ટાઈપ કરીશ  "monday" અને એન્ટર દબાવીશ.
  
 
|-
 
|-
 
|08:56  
 
|08:56  
|This is the '''header output''' generated from the '''function display underscore header().'''
+
| '''function display underscore header().''' થી ઉત્પન થયેલ '''header output''' છે.
  
 
|-
 
|-
 
|09:02
 
|09:02
|Now, we can see the weather report of Monday.
+
| હવે આપણે ''' Monday.'''  નું હવામાન રીપોર્ટ જોઈ શકીએ છીએ.
  
 
|-
 
|-
 
|09:06
 
|09:06
|Now I'll again execute the program once again to demonstrate the other options.
+
| હવે હું અન્ય વિકલ્પોને જોવા માટે ફરી પ્રોગ્રામને એક્ઝીક્યુટ કરીશ.
  
 
|-
 
|-
 
|09:13
 
|09:13
|Type '''2 '''and press '''Enter.'''
+
| ટાઇપ કરો '''2 '''અને એન્ટર દબાવો.
  
 
|-
 
|-
 
|09:17
 
|09:17
|At the prompt, we have to type any week day. I will type "wednesday" and press '''Enter'''.
+
| પ્રોમ્પ્ટ પર આપણે અઠવાડિયાનો કોઈ પણ  દિવસ ટાઈપ કરવાનો છે.હું ટાઈપ કરીશ "wednesday" અને એન્ટર દબાવો.
  
 
|-
 
|-
 
|09:25
 
|09:25
|We can see a message: '''Please check the file wednesday dot txt for report output '''.
+
|આપણે એક મેસેજ જોઈ શકીએ છીએ : '''Please check the file wednesday dot txt for report output '''.
  
 
|-
 
|-
 
|09:32
 
|09:32
|The output has been written to this text fileLet us open the file and check the contents.
+
| આઉટપુટ ટેક્સ્ટ ફાઈલ પર લખ્યો છે. હવે આપણે તે ફાઈલ ખોલીએ છીએ અને કંટેંટસ તપાસીએ.
  
 
|-
 
|-
 
|09:38
 
|09:38
|Type: '''gedit wednesday dot txt''' and press''' Enter.'''
+
|ટાઈપ કરો : '''gedit wednesday dot txt''' અને ''' Enter.''' દબાવો.
  
 
|-
 
|-
 
|09:44
 
|09:44
|The output file has been created with the entered week day name with 'txt' extension.
+
| 'txt' એક્સટેન્શન ના સાથે ઉમેરયલા અઠવાડિયાના દિવસની આઉટપુટ ફાઈલ બનાવી છે.
  
 
|-
 
|-
 
|09:51
 
|09:51
|Now, let us check the next option.
+
|ચાલો હવે આગળનો વિકલ્પ તપાસીએ.
  
 
|-
 
|-
 
|09:54
 
|09:54
|Switch to the terminal and type:''' perl weather underscore report dot pl '''and press''' Enter'''.
+
| ટર્મિનલ પર જાવ અને ટાઈપ કરો :''' perl weather underscore report dot pl ''' અને એન્ટર દબાવો.
  
 
|-
 
|-
 
|10:00
 
|10:00
|Type '3 'and press '''Enter.'''
+
|ટાઈપ કરો  '3 ' અને એન્ટર દબાવો.
  
 
|-
 
|-
 
|10:04
 
|10:04
|This time, we can see the weekly weather report.
+
| આ અઠવાડિયામાં આપણે હવામાન નું રીપોર્ટ જોઈશું.  
  
 
|-
 
|-
 
|10:08
 
|10:08
|The''' hash keys''' and''' hash values''' are stored in a random order.
+
| ''' hash keys''' અને ''' hash values''' રેન્ડમ કર્મમાં સંગ્રહ કરવામાં આવશે.  
 
+
 
|-
 
|-
 
|10:13
 
|10:13
|So, the displayed output is not related to the order in which they were added.
+
| તો: પ્રદશિત આઉટપુટ તે ક્રમથી સંબંધિત નથી હોતું જેમાં આ ઉમેરવા માં આવ્યા હતા.  
  
 
|-
 
|-
 
|10:19
 
|10:19
| With this, we come to the end of this tutorial. Let us summarize.
+
| આ સાથે આપણે આ ટ્યુટોરીયલ ના અંત માં આવ્યા છીએ. ચાલો સારાંશ લઈએ.
  
 
|-
 
|-
 
|10:24
 
|10:24
| In this tutorial, we have seen a sample '''Perl''' program by covering main topics of our previous tutorials.  
+
| આ ટ્યુટોરીયલમાં આપણે પાછલા ટ્યુટોરીયલના મુખ્ય વિષયો ને કવર કરીને સેમ્પલ પ્રોગ્રામને જોયું.
  
 
|-
 
|-
 
|10:32
 
|10:32
| As an assignmentwrite a similar '''Perl''' program '''employee underscore report.pl''' for displaying '''employee salary, designation, department, leave_balance''' details.
+
| એસાઈનમેંટ તરીકેકર્મચારીની  ''' salary, designation, department, leave_balance''' ના માટે એક સમાન પર્લ પ્રોગ્રામ '''employee underscore report.pl''' લખો.
  
 
|-
 
|-
 
|10:45
 
|10:45
|Pass '''Employee ID''' or '''Employee name''' as input.
+
| ઈનપુટની જેમ '''Employee ID''' અથવા  '''Employee name''' પાસ કરો.
  
 
|-
 
|-
 
|10:50
 
|10:50
| Write the required functions in the module '''Employee dot pm '''file.
+
|   '''Employee dot pm '''ફાઈલમાં જરૂરી ફંકશન લખો.
 
+
 
|-
 
|-
 
|10:56
 
|10:56
| The video at the following link summarize the '''spoken tutorial'''. Please download and watch it.
+
| દર્શાવેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો.  
  
 
|-
 
|-
 
|11:03
 
|11:03
| We conduct workshops and give certificates for those who pass our online tests.
+
|સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ : સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.
 
+
ઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.વધુ વિગતો માટે અમને લખો .  
For more details, please write to us.
+
  
 
|-
 
|-
 
|11:12
 
|11:12
|Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.
+
|સ્પોકન ટ્યુટોરીયલ ને NMEICT, MHRD, ભારત સરકાર દ્વારા ફાળો આપવામાં આવ્યો છે. આ મિશન પર વધુ જાણકારી આપેલ લીંક પર ઉપબ્ધ છે.  
 
+
More information on this mission is available at this link.
+
  
 
|-
 
|-
 
|11:25
 
|11:25
|This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching.
+
|આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું. જોડાવા બદલ આભાર.  
  
 
|}
 
|}

Latest revision as of 18:25, 28 February 2017

Time
Narration
00:01 Sample PERL program. ના સ્પોકન ટ્યુટોરીયલમાં તમારુ સ્વાગત છે.
00:06 આ ટ્યુટોરીયલમાં આપણે હમણા સુધી કવર કરેલ મુખ્ય વિષયોને સેમ્પલ પર્લ પ્રોગ્રામમાં સમાવેશ કરવાનું શીખીશું.
00:14 આ ટ્યુટોરીયલ રિકોર્ડ કરવા માટે હું ઉપયોગ કરી રહી છુ.

Ubuntu Linux 12.04 ઓપરેટીંગ સીસ્ટમ, Perl 5.14.2 અને gedit ટેક્સ્ટ એડિટર.

00:25 તમે તમારી પસંદગી અનુસાર કોઈ પણ ટેક્સ્ટ એડિટર વાપરી શકો છો.
00:29 આ ટ્યુટોરીયલનાં અનુસરણ માટે તમને Perl પ્રોગ્રામિંગ ની સામાન્ય જાણકરી હોવી જોઈએ.
00:34 જો નથી, તો સંબંધિત ટ્યુટોરીયલો માટે, અમારી વેબસાઇટની મુલાકાત લો.
00:39 સેમ્પલ પર્લ પ્રોગ્રામ એક પ્રદેશ નું વિવિધ હવામાનના પૂર્વધારણા રીપોર્ટનું આઉટપુટ આપશે.
00:46 Weather dot pm એક મોડ્યુલ ફાઈલ છે જે આ પ્રોગ્રામના માટે એક જરૂરી ડેટા ને રાખવા માટે એક કોમ્પ્લેક્સ ડેટા સ્ટ્રક્ચર રાખે છે.
00:54 આ રીપોર્ટ બનાવવા માટે અનેક ફંકશન પણ રાખે છે.
00:59 Weather underscore report dot pl એ તે પર્લ પ્રોગ્રામ છે જે જરૂરી જરૂરી આઉટપુટ જોવા માટે આ મોડ્યુલનો ઉપયોગ કરે છે.
01:08 આપણી વેબ સાઈટ પર આ વિડીઓમાં તેજ કોડ ફાઈલ ઉપલબ્ધ છે.
01:13 કોડ ફાઈલ લીંકમાં આપેલ ફાઈલસ ને ડાઉનલોડ અને અનઝિપ કરો.
01:18 હવે આપણું પર્લ પ્રોગ્રામ Weather dot pm. જોઈએ.
01:24 આ પ્રોગ્રામમાં કોડ નું બ્લોક namespace Weather. માં છે.
01:29 પર્લ પેકેજ કીવર્ડ ઉપયોગ કરીને namespace અમલીકરણ કરે છે.
01:34 BEGIN બ્લોક main પ્રોગ્રામ થી પહેલા કમ્પાઈલ અને એક્ઝીક્યુટ કરાવાય છે.
01:40 Export યુઝરના namespace પર મોડ્યુલસ ના વેરીએબલ અને ફંકશન ને એક્સપોર્ટ કરવાની પરવાનગી આપે છે.
01:48 At the rate EXPORT અને at the rate EXPORT underscore OK એક્સપોર્ટ ઓપરેશન ના દરમિયાન ઉપયોગ થયેલ બે મેઈન વેરીએબલસ છે
01:57 At the rate EXPORT સબરૂટીન ની યાદી અને મોડ્યુલ ના વેરીએબલસ ધરાવે છે.
02:03 આ કોલર namespace. માં એક્સપોર્ટ કરાવશે.
02:07 At the rate EXPORT underscore OK જરૂરિયાત અનુસાર સિમ્બોલને એક્સપોર્ટ કરે છે.
02:14 અહી હવામાનના રીપોર્ટ માટે જરૂરી ડેટા રાખવા માટે કોપ્લેક્સ ડેટા- સ્ટ્રક્ચર બનાવવા માટે મેં references ઉપયોગ કર્યું છે.
02:24 $weather_report hash reference છે . “place” અને “nstate” સ્કેલ વેલ્યુ ધરાવે છે.
02:32 weekly” એ hash references નું હેશ છે.
02:37 keys - અઠવાડિયા પ્રત્યેક દિવસ ચાર કી ધરાવે છે.

max underscore temp, min underscore temp, sunrise, sunset.

02:48 record underscore time” બે ઇન્ડેક્સ વેલ્યુના સાથે એક array reference છે.
02:54 મારો પાસે વિવિધ વિકલ્પોના હવામાનના રીપોર્ટ ને દેખાડવા મતે અમુક સબરૂટીન છે. એકે-એક કરીને તેને જોઈએ.
03:01 આ ફંકશન હેડર જાણકારી જેમકે report, place, state અને current date. ના હેડરને પ્રિન્ટ કરે છે.
03:10 હવે આગળનું ફંકશન display underscore daily underscore report. દેખાડે છે.
03:16 આ ફંકશન weekday input. ના આધાર પર સ્ક્રીન પર દૈનિક રીપોર્ટ પ્રિન્ટ કરે છે.
03:22 આપણે shift ફંકશન પ્રયોગ કરીને subroutine માં પાસ કરેલ પેરામીટર ને ફરી: મેળવીએ છીએ.
03:27 મેં પેરામીટર વેલ્યુના મુખ્ય અને અનુગામી સ્પેસે ને કાઢવા માટે trim() ફંકશન નો ઉપયોગ કર્યો છે.
03:34 અહી trim() ફંકશન માટે કોડ છે.
03:37 Lc() ફંકશન આપેલ ઈનપુટનું લોવરકેસ વર્જન રીટર્ન કરે છે.
03:42 આ કેસ case-sensitivity. થી રોકવા માં ઉપયોગ થાય છે.
03:45 week day મેઈન પ્રોગ્રામથી પેરામીટર ની જેમ પાસ થયેલ જે લોવર વેરીએબલ dollar week underscore day પર અસાઇન થાય છે.
03:55 આપેલ પ્રિન્ટ સ્ટેટમેન્ટ નિર્દિષ્ટ week day. થી સબંધિત ડેટાને પ્રિન્ટ કરશે.
04:01 આપણે $weather underscore report માં એક વેલ્યુ ને dereference કરવા માટે એરો ઓપરેટર ઉપયોગ કરી રહ્યા છીએ.
04:09 જયારે રેફરેન્સ ના સાથે કાર્ય થયી રહ્યો છે તો આપણે data type ને સમઝાવાવાનું છે જે આપણે dereferencing કરી રહ્યા છીએ.
04:15 જો આ એક હેશ છે તો આપણને છગડીયો કૌંસ માં key પાસ કરવાની જુરીયાત છે.
04:20 જો આ એક એરે છે તો આપણેને index values ના સાથે ચોરસ કૌંસ ઉપયોગ કરવાની જુરીયાત છે.
04:26 પર્લનું રીટર્ન ફંકશન એક વેલ્યુ રીટર્ન કરે છે.
04:29 આ મેઈન પ્રોગ્રામમાં 'function સ્ટેટ્સ ને તપાસવા માટે ઉપયોગ કરી શકાય છે.
04:36 આગલું ફંકશન write underscore daily underscore report. છે.
04:40 આ ફંકશન ફાઈલ પર રીપોર્ટ આઉટ પુટ પ્રિન્ટ કરશે.
04:45 ગ્રેટર ધેન (>) સિમ્બોલ ના સાથે ઓપન ફંકશન WRITE મોડ વ્યાખ્યાયિત કરે છે.
04:50 weekday ના નામ અને dot txt એક્સટેન્શન ના સાથે ફાઈલ નું નામ બને છે.
04:56 પ્રિન્ટ સ્ટેટમેન્ટ ફાઈલ પર નિર્દિષ્ટ weekday થી સમ્બન્ધિત ડેટા પ્રિન્ટ કરશે.
05:02 આ વીકલી રીપોર્ટ ને પ્રિન્ટ કરે છે.
05:05 મેં hash reference ના દરેક weekday ને લૂપ કરવા માટે એક foreach loop ડીકલેર કર્યું છે.
05:11 મેં hash reference ને દેખાડવા માટે છગડીયો કૌંસ અને dereference ના માટે એરો ઓપરેટર ઉપયોગ કર્યો છે.
05:18 હું હેશ ની કી ને લૂપ ક્ર્વ્ક માટે “keys” in-built function ઉપયોગ કરી રહી છું.
05:23 display underscore daily underscore report function હેશ દરેક એલિમેન્ટ ને પ્રિન્ટ કરશે.
05:30 હવે પર્લ પ્રોગ્રામ weather underscore report dot pl જોઈએ જ્યાં આપણે આ મોડ્યુલ ફાઈલ Weather dot pm નો ઉપયોગ કરીશું.
05:40 અહી use strict અને use warnings કમ્પાઈલ ફ્લેગ્સ છે જે સામાન્ય પ્રોગ્રામિંગ ની ભૂલોથી બચવા માટે મદદ કરે છે.
05:48 use Weather સેમીકોલન.અહી Weather એક મોડ્યુલ નામ છે જે મેં આ પ્રોગ્રામમાં ઉપયોગ કર્યો છે.
05:56 આપણે પહેલા જ જોયું કે આ પ્રોગ્રામ ના માટે આવશ્ક ફંકશન આ મોડ્યુલ માં સંગ્રહ કર્યું છે.
06:03 અહી dot pm ફાઈલ એક્સટેન્શન આપવાની જરૂરત નથી.
06:08 આ પ્રોગ્રામમાં હું આપેલ વિકલ્પો ના આધાર પર વિવિધ રીપોર્ટસ પ્રિન્ટ કરીશ.
06:14 આપેલ ને પ્રિન્ટ કરવા માટે યુઝરને એક વિકલ્પ ઉમેરવું પડશે.

વિશેષ વિકડે ની દૈનિક હવામાન રીપોર્ટ, આઉટપુટ ફાઈલ માં વિશેષ વિકડે ની દૈનિક હવામાન રીપોર્ટ, સાપ્તાહિક હવામાન રીપોર્ટ

06:27 જો વિકલ્પ '1' ટાઈપ થાય છે તો યુઝર થી અઠવાડિયાનો એક દિવસ ઉમેરવા માટે કહેશે.
06:32 diamond ઓપરેટર STDIN, થી વાંચશે જે એક કીબોર્ડ છે.
06:38 ઉદાહરણના માટે જો યુઝર 'monday' ઉમેરે છે તો આ વેરીએબલ dollar dayoption, પર અસાઇન થાય છે જે એક લોકલ વેરીએબલ છે.
06:47 આગળ આપણે જોઈ શકીએ છીએ કે બે ફંકશન કોલ કરી રહ્યા છે- display_header() અને display_daily_report().
06:56 આપણે આ ફાઈલમાં “'use Weather” સ્ટેટમેન્ટ ના સાથે Weather dot pm માં બધા ફંકશન ને એક્સપોર્ટ કર્યું છે.
07:03 તો colon colon (::)package qualifier' ઉપયોગ કરીને એક પેકેજમાં ફંકશન ને જોવા ની જરૂરિયાત નથી.
07:10 ચાલો હવે આગળનો વિકલ્પ જોઈએ.
07:13 જો વિકલ્પ '2' ટાઈપ કરાવાય તો યુઝર તો યુઝર થી અઠવાડિયાના દિવસને ઉમેરવા માટે કહેશે.
07:19 $dayoptionfunction write underscore daily underscore report.ફંકશન પર ઈનપુટ પેરામીટર ની જેમ પાસ પાસ કરવામાં આવે છે.
07:27 ફંકશન return વેલ્યુ dollar result વેરીએબલમાં સન્ગ્ર થાય છે .
07:33 પ્રિન્ટ સ્ટેટમેન્ટ આઉટપુટ ના માટે ટેક્સ્ટ ફાઈલ તપાસવા માટે યુઝરથી પૂછે છે.
07:38 dot txt આઉટપુટ ફાઈલને જેમ અઠવાડિયાના દિવસ અઠે ફાઈલનું નામ બનાવવામાં આવે છે.
07:46 જો વિકલ્પ '3' હોય છે તો આ પૂર્ણ અઠવાડિયા ના માટે હવામાન રીપોર્ટ પ્રિન્ટ કરે છે.
07:51 display underscore weekly underscore report સ્પ્તાહીક રીપોર્ટ નું ફંકશન નામ છે.
07:57 પ્રિન્ટ સ્ટેટમેન્ટ સમયની નિર્ધારિત સંખ્યાના માટે આડી લાઈન બનાવે છે.
08:02 આ ફક્ત રીપોર્ટને એક સારું રૂપ આપવા માટે છે.
08:06 છેલ્લે; જો વિકલ્પ 4, હોય તો આ પ્રોગ્રામને છોડી દેશે.
08:11 જો આપેલ નિર્ધારિત વિકલ્પોના બદલે કોઈ અન્ય વિકલ્પ છે તો પ્રિન્ટ સ્ટેટમેન્ટ કહેશે “Incorrect option
08:19 અહી '0' ની એક્ઝીટ વેલ્યુ દેખાય છે કે પ્રોગ્રામ સફળતા પૂર્વક રન થયું.
08:25 '0' ના બદલે એક્ઝીટ વેલ્યુનો અર્થ છે કે કોઈ પ્રકારની એરર આવી છે.
08:31 ચાલો પ્રોગ્રામને એક્ઝીક્યુટ કરીએ.
08:34 ટર્મિનલ પર જાવ અને ટાઈપ કરો perl weather underscore report dot pl અને એન્ટર દબાવો.
08:41 આપણે સ્ક્રીન પર ચાર વિકલ્પો જોઈ શકીએ છીએ.
08:45 અને 1 ટાઈપ કરો અને દબાવો.
08:48 આપણે અઠવાડિયાના એક દિવસ ઉમેરવા માટે કહેવામાં આવે છે. હું ટાઈપ કરીશ "monday" અને એન્ટર દબાવીશ.
08:56 function display underscore header(). થી ઉત્પન થયેલ header output છે.
09:02 હવે આપણે Monday. નું હવામાન રીપોર્ટ જોઈ શકીએ છીએ.
09:06 હવે હું અન્ય વિકલ્પોને જોવા માટે ફરી પ્રોગ્રામને એક્ઝીક્યુટ કરીશ.
09:13 ટાઇપ કરો 2 અને એન્ટર દબાવો.
09:17 પ્રોમ્પ્ટ પર આપણે અઠવાડિયાનો કોઈ પણ દિવસ ટાઈપ કરવાનો છે.હું ટાઈપ કરીશ "wednesday" અને એન્ટર દબાવો.
09:25 આપણે એક મેસેજ જોઈ શકીએ છીએ : Please check the file wednesday dot txt for report output .
09:32 આઉટપુટ ટેક્સ્ટ ફાઈલ પર લખ્યો છે. હવે આપણે તે ફાઈલ ખોલીએ છીએ અને કંટેંટસ તપાસીએ.
09:38 ટાઈપ કરો : gedit wednesday dot txt અને Enter. દબાવો.
09:44 'txt' એક્સટેન્શન ના સાથે ઉમેરયલા અઠવાડિયાના દિવસની આઉટપુટ ફાઈલ બનાવી છે.
09:51 ચાલો હવે આગળનો વિકલ્પ તપાસીએ.
09:54 ટર્મિનલ પર જાવ અને ટાઈપ કરો : perl weather underscore report dot pl અને એન્ટર દબાવો.
10:00 ટાઈપ કરો '3 ' અને એન્ટર દબાવો.
10:04 આ અઠવાડિયામાં આપણે હવામાન નું રીપોર્ટ જોઈશું.
10:08 hash keys અને hash values રેન્ડમ કર્મમાં સંગ્રહ કરવામાં આવશે.
10:13 તો: પ્રદશિત આઉટપુટ તે ક્રમથી સંબંધિત નથી હોતું જેમાં આ ઉમેરવા માં આવ્યા હતા.
10:19 આ સાથે આપણે આ ટ્યુટોરીયલ ના અંત માં આવ્યા છીએ. ચાલો સારાંશ લઈએ.
10:24 આ ટ્યુટોરીયલમાં આપણે પાછલા ટ્યુટોરીયલના મુખ્ય વિષયો ને કવર કરીને સેમ્પલ પ્રોગ્રામને જોયું.
10:32 એસાઈનમેંટ તરીકે, કર્મચારીની salary, designation, department, leave_balance ના માટે એક સમાન પર્લ પ્રોગ્રામ employee underscore report.pl લખો.
10:45 ઈનપુટની જેમ Employee ID અથવા Employee name પાસ કરો.
10:50 Employee dot pm ફાઈલમાં જરૂરી ફંકશન લખો.
10:56 દર્શાવેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો.
11:03 સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ : સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.

ઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.વધુ વિગતો માટે અમને લખો .

11:12 સ્પોકન ટ્યુટોરીયલ ને NMEICT, MHRD, ભારત સરકાર દ્વારા ફાળો આપવામાં આવ્યો છે. આ મિશન પર વધુ જાણકારી આપેલ લીંક પર ઉપબ્ધ છે.
11:25 આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું. જોડાવા બદલ આભાર.

Contributors and Content Editors

Jyotisolanki, PoojaMoolya