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
What is the difference between die and exit in perl?
Why do you use Perl?
When would `local $_' in a function ruin your day?
Explain what is the scalar data and scalar variables in Perl?
How to concatenate strings in perl?
What is the peculiarity of returning values by subroutines in perl?
How to read multi lines from a file in perl?
How does polymorphism work in perl?
What does `new $cur->{LINK}' do? (Assume the current package has no new() function of its own.)
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
Explain the use of 'my' keyword in perl?
What are prefix dereferencer? List them.
List the files in current directory sorted by size ?
If you want to empty an array then how would you do that?
List the data types that Perl can handle?