You are on page 1of 22
__ Sexpteg | ) lang ee YO seviptin ‘ la nqueye eis H PROG Lamentag, is catte. aaa Language ______t2TThese-tigh Leutel_progiaraming Language stag les ¢ Coctin PYthoo ) PHP: 17? Sevipting language execution Chovackeristies! ~ 1) Dynamic Sumtime Checking Y-High leuel_pata-type 3) Open Source benplermenteartion- Examples: - 3) prte_( pevsonal tome page) 4) Tet (Toot command tang > HOstly_Usead -EO UAL iin Wel applicortions litte Tanscug, is Slous “the Slow ¢ Leeution #6 Avawback of Scripting language : +> Gyater Flexibility tether Comtol: Move eotwes- » Ruby (open Souvce (mnplementaction) 5 Bert (Practical extraction and Yeport tanquage) uaqe) © | peseeeng ee Tk is compiley “ based [ES (Wkewpretev based TO M4 USe8 Move Syntax and [> et vedluces the syntar g lOosly TRaNvY Coupled. Coupled. poate: For lage code be faster -forsmalt Code - 9 tis used For Big and Complex py > le need extra memory BXIs sed For Smailer Code LE? Wedoesnot Need extramnoney_ { Sar Ci C4 Tova @ CH [SP Fava sevipts PHP, PYEhon, Pet Tey Raley - ini . a “g.1990's in Tapan : ) fy fuby is a dunamic gpen sources object Oviented and veliecgue ROGVAMINNINA [ANquage » 5 rvs ON AM types OF pla L-Fovms fi Ke Windows, Mad os au ) ‘qu uersions OF ONIX. itis Fury, Object Oviented Oviented Progvarnmning language. each ) 1g 00 Object in Ruby. 2 . TS each and Clery Cocte has they Properkies And actions. p Ruby is Considered -to ~Fotiouor-Yae OF POLA( Principle OF lease 7 astonishment). —Teynian: — Applicationss— es 1s Ruby is useal to Create usels applications Ofdlil tant. | T Siatement a Sorts. " Staternentr LS Ruby offers AGHat Feature Called Ruby on Statement Rarls (Roe) i zend | —|feartuves: - Ruby language has Many. some OF themare explained below. Lobiecx Oviented = Ruby is_purely Object Ovented programming _ language. each and Ctlery Value is an Sbjeck-extery Object hata ve ANd every class has a Super Class i Melle ~Rlexibility: -Ruloy is o Flexible language as you can Seana HedeFine Ovada existing ports —totlate QlloUs is Osers -to-Ree Qitey gig : r OVES AS they With: F Sees = IN Ruby, Coniranks Ore NOt Veally, sou : thie d ina Seni ig Sten iniLalized constant yattt lee Noodified Ina Sev NN) Nay ‘i ing Contentions ing Conuentione: -Ruloy defines some nami ot ~ HS Mavtable, enetheda nd constant & Class: Steg method calls the method. missing wai Pe ee S% method: =—| \) Keywords: — In Raley “theve ave Approxionately 42. Key ons vobich Cant be used ov Okey PUTPOSes “They Ove cated Nesewted Words. Avs) Case $ Sensitiuer- Ruby 1s @ Case -Sermtive language. \owey Case Letters and Uppercase tatters ont different: @| Rotts: = b> t-Lis QO Sl library’ Extended by Pubs puogvarmmiog Leitis iwoplemented by David Heme mneicr tHansoon I> O8- command line “worerferce* h> Packoge lilsvoxy Ls—Frame work For building website Ls Combination oF HTML Css, TAUIASCHpE: : > Rails are Serucn side Cor) Backenct: Upes of Uaviables SS Suro bol DY Loca wovialoles. p fa2yT= 1) ynstance uariabtes : - @ W) class T @@ N) Global" $ Ror C Ruby, on Rails) »— > 1+ Supports “Muc Cmodeiiticus correo!) Sayre ¥me Rai = p 2 auin 5 Dertelopment Festing production Inhy Ruy on Raitt: = > It Allows You-to lanch ateaster Web Tey > Sairer Your money by Using —the vuby ON Ralls Frame wok > We Cad easily Lpdate Our APP wWieh ~the [askese —Funchondity_, =o EbSEs -Meka pro gramming steelhniques bo Uni ke Programs: t } \ ~ \\ \\\ \\\\ Pepe to ate: | ——— Z 6 lexical Stouctue |= ~ Lexica’ See ramet nang! Knouon Os the lexical ov token structive L> The vules fox Forming Ualicd tokens oy lexical units ae 1 Language. 1 I—aTTo Kens Ovethe Smallest meaningful Onits of a progvarn. f Ls such as Keywords, iclertifers, Operators, Constants g Puc tuoction symbols + -treve Ove SOME ComMoDN eleMeNES OF the lexical Structure in SL 1) Keyuoords :- KeyWords are reseed U0rds inthe language that hate Spectal meaning & canes be Used Qs Identifies €q.- “iF, “else? it) Wheaties .— Idemtifiers ave Names Usted —to vepresent Uaviables, Function, Classes, Ov Othe emtities in @ Progman Wi) Opercrtors.- Operators ave symbols Used-to perform Opevations | ee ACD) jath ite Space: — ON Uavialbtes , e216 88109, Ov Malues. . IL) Constants += Constants vepreceoe Fired uaiues ino program They Can be oF different “YP: 2 U) Delinnitevs. t= Delimmiters One Symbols Used 40 Seperate token Ov indicate. tne bovaciavies OF Expression ovblocks oF code: , AR) Comment $= Coraments are-Used —to add expianetory notes ov Aicable portions OF code: tuhitespace refers to Space 1 tabs, and line breaks | ok Oxe Used Fox formating Ane veadability- el Lit) Combo\ Ftous. — Com tol Flow Gtatenned ts detewmine he order _in which | Statements Qve executed: bated on certain Condition Synkectic Stoutures = 4B >The syntactic Structure Also Know as -the santa of ¢ Ly Scripting lanquage de > “The wiles and Shuckive Foy Forming Walia ctatements And Expression inthe language + PA Species the AMMO and Structure OF Kine Language ANA goutterns how different language Cons duck con be’ combined —to Crveake Naeaning Fut ANd “Udell --Fowned > Prognams - si ~Weexe Axe Some CommoON elements OF “the Synterbye Soucture “oe to Scripting Languages! = a) Statements- A Statement isa Combine ONE OF Code ~that perform Gn ACkion OVO Sequente OF Qckon is) _ Expression »~ An Cxpression 16 a Combination OF Ualties, Maviables, Operators and runcton: Calls that Pwdutes a Ne Sul-saq Ualue + Ww) function s: --funckions allouo!-tne” Grouping of code Int Neusable blocks ~that Can be Called GNA executed usith — ay Specific Ovgument + | \) Datatypes: gLoften have bunk-in on predefined datatye—____ | Such as Wn kegers , Hoa-ting ~poiat _numloers, SAnings boolens» ——__} Oxxoys, objécks And move » el Ni) Scoping & Blocks - Syntax Qotlers how blocks oF lode Ae. ee defined God Scoped Usithin the language. 2 Nid) Cornments: = Simitay to the lexical Souekive 1 Scripting = lonquage s Prouidesyntax ov adding _Commenks to code: ee) Ruby Gems is & package managment Syitem fo Ling. language» Ane Ruby programm 7 It Allows developers -to easily manage and distribute libvovies Qiso Known as gems: Raby T?. Rubygems Simplifies -the Installation wpdating, and emoual OF gems, 4) nseatlation : - Ruley Gems is—typicalty included with modern 7 1 Baby Installotons- W) Genn Repository: Rubygems wnaintains a Cetrtral vepository cated -the RubyGems-ovg Veposi tory: it) Searching For Cems’ - You can Search Fov gems Using -the gem Search’ command + iu) Gem Installation: TO .tMscall JEM YOu Can Use -the "GEM iMstall | Comma Followed by the gem name Wd) Cem Depenctencies:- Ruby Gems handles gem dependencies automatica! wn) Genn managment: = "Ruby Gems prouide Uawious Commands Fos enanagiog, Instalted Qems- Uti) Green file and Bundllér:= [n Added -to the Ruby ciemns commend -line WrevFace, Prany Projects use atte Carted"GemFite ¢ A TRuby and -the web:- — Ruby is AOpen source Pregrannming tanguage: > Ruy is @ Sevier Side Scripting language sinntlav-to. python > Wis a Scripting language. L> Ruby has a clead and easy syntax -thak-Gtours a Mew Aeuielopev 0 learn Uery quickly and Casily I> it can Also pev chev. sks Ke CQT pw wammning ov AS o__ replacement Foy ptip- ES N@ [Sevepes cq (Corman Gortousay Wterface)is standavd thot Y Facilitates cormmounicotion biw Web gevles and-etteveal datkalyge OV INFormation Gouree- ‘ 4 FCG I Standora Was defined by We ‘Word wide Web CON Sort And Specific how a progvar I NkevaltS With O HAypev tex hansfey Protocal: — Features OF CCI! ~ ee PP His artery Well-defined and Suppoved Standard: — P= CQ\ Scripts ave generally UD eben in NaNQUages cuch Ax peaul, % —? [> CGI allows Applications “to \wterFace With HTMY endbiing Aynacnte Content Generation Fov useb pages. ie > CGI the best method—to Create Q counter because thi Commentby the Quiekset: a > CAL standovdiis Geneany the most Compatible Lait tex “Ea browsers Arduantages:— Disddluantages~ > Quick uraplemen tion, > Security p> easy-to use existing Code | => Scalability ~@ [cookies in Buby: - F> ATTP protecalis “a Stateless prokocal = But Fowa Commeial Loebsite SRE: [PP Ik is Vequiveel to Maintain Session Information aceon —_———_ AiFFevent pages. Se Cookies axe a plain text data vecord of Hue cane slengthfi FEXPIES ~The date the Cookie wail expive: (E-this is blots, the — COOKIe WIL Expire he Visitor Quits the byouser- — 2 Bormain = The domain name oF Your Ste ee + patl— “The path -to -the divectory ov webpage ~that Sets the Ser SQoKies-“This roasy be blank 1 You Want -to Vetere: > = C4 _ = : Secuve" Up cookie MAK Only le VetriNed With a cecure ee So tne -Asecure Sevlev- « Name = Walue = Cookies Ave set And yetiued a « Sov Key and Ualue paivss 0 OF + Secuve” LF this Field Contains the wood WebSeuers = Woebsevler i$ A Hwogvam Which protestes “the Networty requests OF “the Users and Sees “them With File s that Cvedte oebpages This exchange-tarkes Place_Using -Hyperte xt “branstey protocal CHTTP) othe Web Sertier Can be any Goktwareow hardware boutis Usually A SoktwWare Kuoning, 09. Compute. | el jel) es Pegquere Pequest “Tiateb Gouses meee eso] = RESPONSE ESP Wr There Oxe GOene WeBSenters avarable INK Manet oth Free and paid: 7 ; 6 ae Apache HTT PSeruer = oe 1) PMIcrOSOFE Nene LnfForemr Bon Geruices wi) lighttpd qu) JiPsaw Sewer w) Sua Torin Syskeun yas o- ‘CO V0 pa SOAP tale b Sewices t= based protocal Fowaccessing web Sevur —tww0 application « and language Inclependent+ proqanmi Og _tanquage Applications - ——~ ces + > SOA p “Stands for simple Object Access motocal HS aKML > soAp is @ Wwac vecommendetion For CommMuUNiIcaetion blu L>soAp is XML baseal protocal + (1s plattom (dependent —> Byusing SOAP: You votll be able be to (olevact Lofth Othe $ end Aduontage Disoduontage i Als Security >stovs iz I> Language and platforrn (ndepencegt > UOSDL depencere | SoAP Vequest Message through, if. Soap MTT : oAp_| ps i A i< | client” G88 \eigonse Message tough Tp [Sewice| | _ * ® | Ruby tik | 77 Ruby! is alibrary~that_prouides 0 Ruby terface to-the ie TK Graphical user wteaface (Gui) toolkit: — = OTK is G cross = Platform -toolkit that Allouss developers to — & Create Get Applications With a Native look and Feel oo — a dittevent Opevating ey stem: t — Ln i> Touse Ruby TK 1 you Need -to haue the TK ibmavy = ee Instated On Youv System: e L redieeds Program »— — a seexedte the main Window > iy Nook =TkRook Newt HELE * HeworTK I" = Bt eveate atabel Widget = ee \abel =-Tk Walbel new Groot) do = ta tert “Hello, Ruby [Tk 1” > \ PackFoadk ts; pacly is; side tere} ae >= Ss ~_ Page No, ate st Create A button widget button =Tk Button newlvoodo tent “Click mes" 1 command £ TK: me ssage Box Hille: “messager, Message, “But: Pack f Pady iS) pacly (5; Side Wight3 end att Stent ~the tK epi ent (oop Tk: maialoop Sinope TK Applicakoo : = ‘A typical Souctowe Fow Raby da widgets to u-to \nuildup —the USey iWterfate and then Staxt the maig event \o0p by Calling TK: Main \00P- LAA (Nidgek = PATCH Widget Provides OSers With An aveg Sothatthey cay enter nutbple lines OF “text: Tent widgets ave part OF che clots eT tnlidgeks NOt the theme d.TH. widgets ES 2 Kinds of Annotations :— DTAGs:- QUow Aieferent portons OF the text to be aspeyed wile differen Fonts and cans: 2 it) Povkts:~ “The Seconel hom pF annotation Consists oF marks, Wirich ONt FOO NG THON Kes in the text» itt) Exntoectee Windows: - The third: From oF annotation Giltowas arbibary usindows “co be embedededin Qaext widgets: Syntax = TKTEeRt- Newlvook) L - Skandard options. — - - + widgek Specific options— - - - [event binding != AS Used to banalle “the events. Naiced by “the Usev ACbon§ likke button click Wouse smmouement i Keystrokes, eke - -- L>uvshen the DOM event happens At an element it calls-the Specified method in -the porcticulay Component: a Using eucat binding we Cag bind date fom Dom-to ee ~che Component and _bence Can use “that data ~ForFurthev ss Puy poses * a Syntax: = e eat Cewent) = Funebiond)> ZeElement (ewent) 7 ss s ss Canuas: - A canuias Widget tmoplements Sructuved Qyaphis. Acanuas displays any number oF ttems , Which May be thiogs fike Nectangles, Civele lines ANd te KE- thems may be manipulated AOA cal backs may be PZ Associated With itemstn much Lhe fame Way thatthe lind method allows call backs -to be boon a to cotdgets: Suntett: = Ak canuas -news qe m= = Skandard options = = -- : 5 qn = 77 Widgel~Cpecifi copbons + =. + Berolliva A ccrottay helps -chevser “to see alt paves OF Another widget, hose Contents Ay piicauy much ‘ang ex tats shat canbe shown in -the do ti ble Screen space. v PRA : TkSeroilbar Neus + = Standard options i) == ~~ Widget - specitie Options— - ~~ & il Lael With. dade in Ruby once You Start Adding j _ inc. howeuer the possibili Ruby Object in ¢+- > Rubyis an ideal Object ~oviented Programming lan. [The Features OF an Object -ov lembed Inctude data encapsulation, Polym Cilostnaction, OUerload tng ete. > 1M Cop's Classes and Objects Plays ao \nportant vole E>A class is a blue print From which object ave Created: —> The Object is Also Called as an instance oF aclass: Syntax:- Bes ave endlesc. Oe. Proqvanm tag language OPhism, MMheristance date Objeck_ name = class—name- new TTokebox @xtension: - Jolie box example —infacing C. code with ruby and Shoring data and behauiow bolus -the +00 Worlds | & Uovapping Cc _Stouc-tuvest= f) Uatue pata -uwyYap-stuck- 2) Walue Dake ~ make -Shuck f 3) Data Get= struck: ij Cyveatior ere on Objeck OF class cD Player in-one Ruby program - Led = CO player now: > The Implementstion oF new in class is Simple om : qoemory “FOr New Object E then Catled the Object toitialite ——§ toetrod —to Initialize that Chemory oca tions sean) tng eS | _—————<__ ae athe 4 as J 2d Dd oD 2 > a objects in Ruby Suchas stn PDNocaton Functions THe _allocation—Function is vecconssible fox Creorting he Memory Used by Obieol: Lr IF the object (mplernented cloeso't Use _anydata Otherthag Ruby instances Lorre Uaviables, then You cloo need tp OM atloca-ton —Functon ~ Ruby's deSautt Allocator uxt WwWor Kjuse—Hine+ Cloning Objects: = > AllWby objecks Can he Copied Ustag OMe OF tO Methods L_ dop and clone: Both Prodluce_O Meus UNstance 0 Ether Neceittes class by Calling —the Allocation -Function Th test ~the Oviginal Object cade check: s Hat A-type of data | * Has a Free-Function with Same addvess acfreefunci Menrory @iiocartion s+ > memory attocaion Yefers to-the process OF vesenling & [ Porton OF A Computer's memory to: Stove data, once chatog sthe execudson Oba Programa: => Sn many progrannning languages: IMcluding Ruby merooy A\ocatsod is handled Qutometicatty by the language Yunbe., Ov Uivkual mochine + ¥ 7 1N Ruby, memory anocation-For Objecks is managed by the Ruby itewpreter using technique caited “Garbage collectoo" > 7 TE Jarroage covectW AUtomaticany detects and veckins > | Memory “race 1s NO Longer in User freeing {Op For -Furtuve allocates Ls 7 This velteues -the Programmer-From Manually managing memoy Allocation Ond ckallocation: : : i YS OMAYS, Ov Custom Objects -the 7 (nk preter dynamicatt locates Memory ~to store thers dale: ~_____Lerthe sne ob =the otlocated memory depenle on the type ond” aire OF-che Object: 7 ‘ Rubs ¢ Sutter: = Rulby_S Kou -Fov Its ick 7 ; LP sided Ad rare naemic_anel Tlevibte-type system: is Co A ymnanmcatiy “byPed_ language, 1 i w Ts meaning —that Vaviable types ave Aetewmnined of Umi yather hai |_ betes, explicity declared. 0. 1 MIC ing = 1, ) Dyramictyping 10 Ruby, you don't need ~to declare that type ofa yoniable €vplicety: 7 iD) Duck typing :- Ruby -Fotiouns the puinciple oF “duck typing *uohich ceans-that the Suitability OF an Object For a particuley operertion is determined by its a behauioy Yatherthan tks class ov type: m) Gaon Typing: Although Ruby is dynamicauy typed itis also Stionglyty ped: ia) Objects Od class: 11) Ruby euerytining is an object including primeaue type Such as numbers and booleans: ¥ £ one Notables Feature oF Ruby is “che ability +o \\\\ \\ \ \ \W) Open classes + = Modify existing classes Ok Yurrtimes y © | Embedding wuby ro Other taquage: - L> Ruby is adynamic prograroming fanquage it “Vules on how-to louild features andikis wery © Ls Ruloy proutieles Small: etegant and powrerful Code: cf :- public, private & protected clo similar jobs- rc’: - Rubyachave heathy symbiotic Xelactionship python: Ruby can be Very harel sto debug ok-mes while python is Very Cvplicity and easy—to read 4 Fits Free Nature doesnot hatte hard lose to Spoken fanquoge f pedi= pul is UNOgQANI2ed, Messy HecoUse oheveas Ruby is G welt ovganiveal languoge. a ‘outa “Ruby frase program vuns chivectly as 1E aN GL Whereas Foua-bared codes averse corapilead ted executed- PHP:- WebcleUetooment and deployment iS wey sinpte with [__pue at Compared to Buby. un terpreteal @ Embedding ORuloy interpreter: = Loin adai-bon to ertending vuly. by adding ¢ code 1 You Con ails —tom -the problem avoond and embed Ruby ikseth Within Your Applicaton > Apt.- Embedded wuly API Uoid Wuby- intel Sets vp and \ihalize the Interpve kews This Puine-Hom Shoutd be Called before Oiny Othev Ruby- Yelated Fune-tons+ ext language is ot loosel weet ona mthe data ee es pest sokey Paces, | Spectfy datatype io Perl Progvamming. aera -s There ave basically three datatype in perl 4) Sscatavs- Perl Scalavs ove O Single data tkem-“They ave sien) Uavialles, Preceded by a(t) sign: A Scalay can be a number. ye ference Caddve ss of auaviable) Ova String: * ii) Aways - Perl Aways axe An Ovdevec) list OF SCalavs They ave ded _by(@) Sigh and accessed by thei index — prece (alith Starts With 0: Ww) Hashes: = Pevl has are AD Onovdeved collection of Key value paris They ave preceded by Cv.) sign and acceASed Using Keys peat Maviables ! = A wavialle is a place “thoughout the Progam when Wawa bizare tostore alues- “They Can be mani culated Created they vesewle Some Memory $ peice: s“Thext Ave ihrer types oF Uavia tole * eseatay defined by $ eArays *@ « tases 8 wf ® Hinev points. OF \ooping: I> Pew For loop is also Keown as c- style For \OOPThe Fox loop (Levoles the Stakemen L OYA POW OF Lhe PYOQTAM Seueval—times Mehas thee parameters: Diittalixe:~ This part Joe tecuted Stand ONY ONCE: 14 {Hy And Adds declares (Oop Uaviable- alttes 1k) Condition: ~“The For loop execution til the Conclitionss true. Wwheo Condition is False loop execution Stops And execution teveninates Out OF the loop: liv) Ievement (decrement! The For loop variable IMexement ordectemey Os long acsit Sates +e loop conditions when Condi-tonss HOE Sertisifiecl LOOP terminates ANA- Output is Printed. Syntax: = Foi Ci nitializotion; Condibonyiny (deci) Al tocde tobe executed f —Flowchast:- \} do talhile loop: = [Mo teatizetion] B vnlike Foy and while loop ithe. fase | Ao while GOP Checks it's gonetOD | Contin. a usthoe bokbom of Statemet the Oop + So do. hile 1009 wit! Ther aex) | €keeute atest Once: atbile Joop’ = aes aia poThe Perl Wihile Oop 13 Used to [flouschow t.— iterate -the Pavt OF Program ov V do Statement Magy ~times: Statement Syntax: ~_Iathile (condition) f \ MCOde ~t0 be erected ; C Condition lousclant', Flouscly ea easel [Tue L] statement] ———— pack and udpach in pel. ain pew the ‘pack! and ‘Unpack’ Function are Used For conuerting date blw binovy & textual representations. > TThese Functions are commonty Osed When waking with binary’ i> Such Os when reading “hom. ov Uvi ting -ko_binavy Files’ Me twOork Prokocal $1 ov Encoding [decoding data in Specific Formats’ 3) pack: The pack Function take a template Sting and alistor Ualue And yetorins A binary string Nepresentation “the packed clata + > I+ Consists OF OME oy More —Formmak Spectfiers that define the dota type, sire.and byte order: My binary -data= pack (Aan", Sabea '12345)7 uohich should match the format used -to pact the date: ea:- my (dst foun) = unpack (LAG N" 4 binary data): Q@| Eile handling: i> File, hhanaling is the Most tnportank, part.in any programming language: A Filehandie 1s. an Enternal perl. Structure that associate With ale name: — Pent File handling is Lrapontane Oikis helpful in accessing File Such as textiles: logfiles ov conkiguvation Hiles- I Perl-Flehandlers Ave, capable oF Cveating reacting 1Opening and Wt) Upack = The Uppack Function takes A template Shing anda binary Sting and unpacks the binary data into alist of Ualue >The template String Specifies ~the -Formakor-the Packed date, | Closing File. # Create File: + Copying afile + Open File. + File test Operators + Read single lineata-time * ~_|_-* Read mutt tine aba tme ft wie Fie ~__| + Close Fle ——__|_* File handle operator efile handle print ()-Functon @| Euan: - Is This uncon eviatuates Expressiod Aime asit EXPR Weve QS Ceperate perl script: Ls This allows you “to ose 0 separate pevhaps User ~supglied, piece of perl Script Within your pYogrann > An eual expression Skakement is elaluated aaa, each time. he Function is Called + Ls, The Second Form eualuates BLOCK When the Vest OF the Sevipk is parsed Syuntar— etal Expression » etal BLOCK Return vatue!~ This Function vetorn value OF last evaluated Skakement in Expressing ov BLOCK + Dake Stuctores! — Tha axe two ‘data soucture U6eal in perl Script * A) Two-dimensional avvay data _$ tucture a) Compler data Structure - @, 20 arvray Canbe defined as aN Owoy OF arvay's.7The LO Away iS Organized as mabices which can be wephesented asthe Collecbon OFrows'and- Cotums: . [> 20amay Ove Created +o implement arxelatonal eae look like data Sthuctures 09 10 r> Le prouides each of holding: bulk of date Ab once which Can be passed toany node -hunctions Wherever! sequivécl Symtaks = ine aw Cmax vous] (MaK ~columns)y 2 Complex Nata stiucture > IN Perl (You can Create Compler-data Stouctuves by com Oways and hashes into mutt dimensional stu chives > These Complex data couture aliow You to’ ve present and Manipulate more soghisticated data hierarchies: eas > nested Aways ov hashes, ONO'S OF hashes OF awa 7 an Quen aways OF hathes , ete ~~] i) nested Aways i) Away OF Hashes ii) Hash OF Aways lu) Amay OF Aways OF Hashes: = 2) package: ~ > P_ Pert Package is a collection OF code Which Nest Namespaces pet oodule ts a package detned in ale hauing the same nameas athat of -the package and hawing extensions >To different modules may contain & Waviable ove Function of —the Same name Any laviahle Which tx Mot Contained in any Packed belongs to the main Package. Modutess- > A Modules IM. Pew iv A Collection OF related Subroutines and Mowia bles-—thak perform O.6ek OF Programening tacks: = Pert mockules Ave Kevsable « Uavious pet Modules ave Quaila ble On the Comprehensive _Perl Arichieve networs (CpAN) « b-these Modules Couey @ Wile Nange OF categories Such @1 Nekwot Cal Me, Processing... dakehates Interfacing eke, ——_lobiects= [> Per_protiides Us some “tools to butte Object Oriented System: Rel Object Ovlented Concepts ax based on Yeferenley, ANonyMous "ous and hashes: {DU Knows the class name ato which it betongs- tt ts Stored asa ——Lictennce ina scalar vartabler ———=27The Same aviable can hold di sterent Objeck Indifferent | Classes at 1% paty holds O-Nefe vente “to the objec Lar ee | — des Im iks ov —S=— WtevFacing tO=the Opevarting Systeno in perl! > AL Class is Sienply O. package: 1 E Contetins mrethods that Ay Operate on Object s+ a I> A method is @ Sulvou-ine the expects AN Objeck Ve-fevence ose package name as the Frc Ovgument: 4 e- as —s > Im pest you can [ntevFace With the Qperation Systen USin Lovious built -ia-Funetions and mocutes: ae >This allows you +O execute System Commands, access enuivonment Laviable , hanideFile Operertion And pevfow Other OS —relatedl asks + ial Below Ove Some Common ways to (NberFace With th, Operating System in perl + Running system commands: “To execute Syctem Command's, you Con USe the ‘system fune ton ay bacictcts (*') to Captuve the _ DUEPUL “The eysters -Funetionid! Oted For tuNGing Commands doesent Sa * Accessing enuivooment vaviabbles! - you can access enutvonment awiables “using -the'/ENu’ hash + te Contains the enutvonment Udwialbles , Wtth “the Vaviable Name asthe Key ana tks Value, ss Qs ~e Corres ponding Ualue+ S —— * File Opevation! ~ Perl Proutides avich sek OF BuliE~in Fuoctions OHA modules —Fov-file Operation. S4:-open’ ,\ close vead ‘and ‘wx —$§ Ho wows (otith Files = + Divectory handling:-“To handle divectovies, You ean use the ——-—~ Sopendix! and teaeldiy "Funetion-to veadl the Contents of a ——-—~ divectow: > + -2wor handling and Status code: eShen running syste = Commands ov e Recurting Okhe OS- Yelated ~extke, it's essential ~~ “co Cheek for vvous ANd starts codes —to handle Any. sure” —~ shot May avise- = RS > eghands In temet progranaraing IP perl - = pivkey Waals. Lnkevack programming in perl eupicaty reed, prackial mands -0n Welo deretopmenk Witla perl, Focusing of Cveating web application handing sex npuky Processing From data and tnrevacting with we lo Sevues ANd dakabaces-(t INuotvies Using Perl's capabilites to build dynamic an A In tevactiue web page’ cal Security [sures in perl. = {ike any prograniming language Pert can be Vulnerable to seaurrty [sues if Oot OSE properly + Ls some Secureiy Issues in _perls ) Code injection a)evoss—site Sertpring(xXes) 3) Path traversal 4) insecure File handling 5) Dental oF Seruice Cos) ©) Inserue Ubrarics a) akeoF HTTP s = Bin suPAcrent Logging ana Momitoring - L> To Mrgeike these Security (sues. a Always ualidate and Sani tire, Oser Wopue’ ® set StictFile permigsion —to protect Sensttiue-Me- Es # OSCHTTPs “to cacvypt data uring -transmigsion:

You might also like