In line 42, what is the purpose of the character? Refer to the PERL script shown
Question:
In line 42, what is the purpose of the “\” character?
Refer to the PERL script shown in Figures 8.3 and 8.4.
Transcribed Image Text:
C:\Users ex_h\Documents\Book\SQLServerLogCheck.prl - Notepad+. Eile Edit Search View Encoding Language Settings Macro Bun Plugins Window I Dac SQL ServerLogCheck pri 1 Sample program to review, extract SQL Server log records 2 3 # use TIME::Local; #note the "\" usage #infile "C:\\Program Files\\Microsoft SQL Server\\MSSQL11 MSSQLSERVER12\\MSSQL\\log\\SQLAGENT OUT $num - 0: $mindelay= 30; #set the time delay between checks in minutes 8 #delay= 60 #mindelay, #compute the number of seconds for the time delay 9 G 6 10 11 12 13 localtime (time()); 14 #extract the date and time 16 #datetime substz (4time, 4, 12); 16 #change spaces and in datetime for use in filename 17 18 19 20 21 22 23 24 28 26 27 20 29 30 35 36 START CHECK: $info = "n": #varn = "n"; Sex = ""; stime 41 $datetimes/ /_/9; #datetime= 3/:/-/ topen and check SQL Server log for messages open (IN, "sinfile") or die "Couldn't open SQL Server Log File sinfile "/ while (Sinput = ) { chomp ($input); Sinput= /[\x00-\x1F\x7E-\xFF)//g/ remove nonprintable characters #extract date time stamp from message record (ignoring blank lines) if (length (input) > 0) { Scurrdts = substr($input, 0, 19); } scompare timestamp to last processed; only process later records if (Seurrdts le slastdts) (next); #check for information, warning, and error messages if ($input =/\9/) ( #info record found if (sinfo eq "n") ( #first record..open output file sinfo = "y"; #reset flag with first record found #infofile="Monitor\\Information "datetime. "_Records"; open (INFO, ">$infofile") or die "Can't open output file Sinfo"; print INFO "$input "; } ale ( print Norm length: 2,511 lines: 75 "sinput "; Ln: 1 Col: 45 Sel: 010 FIGURE 8.3 First part of script to monitor SQL Server logs. Windows (CRLF) X UTF-8 INS
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (2 reviews)
The is to Perl a special character The ...View the full answer
Answered By
Rishabh Ojha
During my undergraduate i used to participate as TA (Teaching Assistant) in several electronics and computers subject. I'm passionate about learning Computer Science as my bachelors are in Electronics but i learnt most of the Computer Science subjects on my own which Machine Learning also. At Present, i'm a working professional pursuing my career as a Machine Learning Engineer and i want to help others learn during my free hours, that's all the motivation behind giving tuition. To be frank i have no prior experience of tutoring but i have solved problems on opensource platforms like StackOverflow and github. ~Thanks
4.90+
3+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Create a Java project to implement the B-Rep data structure shown below. Define classes for all the topological and geometric entities shown in the figure. SURFACE Plane CURVE Line SOLID LUMP SHELL...
-
Find the transmission parameters for the two port network shown 4
-
What is the purpose of the $match variable? Refer to the PERL script shown in Figures 8.1 and 8.2. C:\Users ex h\Documents\Book SearchForTerms.prl - Notepad++ File Edit Search View Encoding Language...
-
The parol evidence rule: a. allows the introduction of conflicting oral testimony relating to contractual obligations if the parties had an oral agreement prior to forming a fully integrated written...
-
As used in accounting, what do IMA and CMA stand for?
-
Presented below is a list of items that may or may not be reported as inventory in a companys December 31 balance sheet. 1. Goods out on consignment at another companys store. 2. Goods sold on an...
-
Explain the difference between traceable and joint costs. LO.1
-
Indicate four signicant criteria that operational objectives should satisfy.
-
he summarized financial position of A Ltd. as on 30th June 2017 is as under: Share capital: 10% Redeemable Preference Shares of 3 100 Equity shares of 10 each 12% Debentures Revenue reserves Total...
-
Who would you ask to participate as a member of the design team? Why? You are asked to lead a design team for a new database to be used by your company.
-
What happens after the script runs and finishes searching for warning and error records? Refer to the PERL script shown in Figures 8.3 and 8.4. C:\Users ex h\Documents\Book SQLServerLogCheck.prl -...
-
Rank the following in order of increasing reaction rate. (a) Dynamite exploding (b) Iron rusting (c) Paper burning
-
RQ3: How might finance affect the formulation and application of corporate strategies?
-
How does this scene relate to a person who is?
-
How does Max learn to apologize?
-
Why are some on the spectrum bullied, and how must a parent feel?
-
Question 1: Response to Theresa Johnson?
-
Sketch all the possible stereoisomers of (a) [Rh(bipy)(o-phen)2]3+, (b) [Co(NH3)3 (bipy)Br]2+ (c) square-planar [Pd(en)(CN)2].
-
During the month, services performed for customers on account amounted to $7,500 and collections from customers in payment of their accounts totaled $6,000. At the end of the month, the Accounts...
-
Assume that a private internet requires that the messages at the application layer be encrypted and decrypted for security purposes. If we need to add some information about the encryption/decryption...
-
If a port number is 16 bits (2 bytes), what is the minimum header size at the transport layer of the TCP/IP protocol suite?
-
Assume a private internet uses three different protocols at the data-link layer (L1, L2, and L3). Redraw Figure 2.10 with this assumption. Can we say that, in the data-link layer, we have...
-
Al preparar el estado de resultados pro forma, cules de las siguientes partidas se deducen de las utilidades brutas para llegar a las ganancias despus de impuestos? Pregunta de seleccin mltiple....
-
Lawson Inc. is expanding its manufacturing plant, which requires an investment of $4 million in new equipment and plant modifications. Lawson's sales are expected to increase by $3 million per year...
-
20 On January 1, Year 1, X Company purchased equipment for $80,000. The company estimates that the equipment will have a useful life of 10 years and a residual value of $5,000. X Company depreciates...
Study smarter with the SolutionInn App