i have a folder called 'error' and in that, i have error log
files which are generated by the build,
now i want to findout the string 'error' from each log
file and that error has to be copied into the another file
called 'analysis'.
how do you do this in perl?

Answer Posted / jyothsna

grep error ~/error/errorlog.txt >> ~/main/analysis.txt

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which of these is a difference between Perl and C++ ?

566


Differentiate between use and require, my and local, for and foreach and exec and system

484


Explain perl one-liner?

514


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

525


What does undef function in perl?

521






Which guidelines by Perl modules must be followed?

565


Explain splicing of arrays?

520


How to read multi lines from a file in perl?

506


What does perl do in linux?

529


How will you open a file in a write-only mode in perl?

476


For a situation in programming, how can you determine that Perl is a suitable?

482


How would you ensure the re-use and maximum readability of your perl code?

518


Explain split function in perl?

557


What is perl dbi?

493


Enlist the advantages of using c over perl?

515