🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

I need to a perl script

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() {$str.=$_;}
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….

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x