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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND