rajeshkumar created the topic: i need to a perl script
Hi ,
There is a file called test.txt what are all the different ways
BEGIN:
test 1
test 2 %%%%%%%%%% TEST TEST TEST
test 3
END:
need to grab all contents in between BEGIN and END:
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
rajeshkumar replied the topic: Re:i need to a perl script
Solution could be …..
#!/usr/bin/perl -w
$file=open(f, "test.txt");
$str="";
while(
close(f);
$str =~ s/BEGIN:(.*)END:/$1/egs;
print $str
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
venu.madhav48@gmail.com replied the topic: Re:i need to a perl script
Please answer the below questions
1.What standard Perl modules have you made use of, and why did you use them instead of the equivalent built-in functions?
2.Write a statement that checks to make sure there are at least two command line arguments and exits with an error if not.
3.How do you find the number of elements in an array?
4.When an array is defined, PERL automatically numbers each element in the array
beginning with zero
venu.madhav48@gmail.com replied the topic: Re:i need to a perl script
Dear Rajesh,
Can u please help in answering the above questions
rajeshkumar replied the topic: Re:i need to a perl script
Hi Venu,
i will post this solution today evening…
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
venu.madhav48@gmail.com replied the topic: Re:i need to a perl script
Waiting for your post….
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals