Extract string from a file using PERL
Posted on 2009-04-24
I have a content of a logfile as follows (below), I need to open a file and search for a string (using PERL)"Installation operation completed successfully"
string from this if this string is found i need to retrn 1 from the perl function.
can somebody help me in how can i approach this , can anybody send me the pseudo or link to the similar script.
=== Logging stopped: 4/20/2009 23:02:18 =======================================
MSI (s) (18:78): Note: 1: 1707
MSI (s) (18:78): Product: XI R2 Service Pack 6 -- Installation operation completed successfully.
MSI (s) (18:78): Cleaning up uninstalled install packages, if any exist
MSI (s) (18:78): MainEngineThread is returning 0
MSI (s) (18:30): Destroying RemoteAPI object.
MSI (s) (18:08): Custom Action Manager thread ending.
MSI (c) (30:D0): Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (30:D0): MainEngineThread is returning 0
=== Verbose logging stopped: 4/20/2009 23:02:18 ================================