subject

Write a perl script that processes the output of the echo $path shell command. this command displays the content of the
shell environment variable, $path. this variable contains a list of directory names. when you try to execute a command at
the command-line, the shell will look for the program file corresponding to that command in each of the directories listed in
the $path variable. your script should do the following:
1. execute the echo $path command. to execute a shell command in your perl script, see the example for the qx
quote operator on the "quoting operations" slides.
2. use a regex to extract the name of each directory in the output of the echo $path command.
3. print each directory name to stdout. print one directory per line.
note: you must use the m//g regular expression construct to extract all the directory names and store them in an array first.
here is an example to extract all integers in a string and store them in an array:
$s = "we had 3 clubs with 10 people each in 4 months.";
@arr = $s =~ /\d+/g;

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 13:00
Your mom wants to purchase a laptop computer. she said she wants her new computer to be able to play her dvds so she can listen to music and wants to know what type of optical drives will play her disk. which type of drive should she look for?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What is the total number of time zones that can be configured to show by default in a calendar in outlook 2016?
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
Ramp charts are generally created in wordlotusexcelpowerpoint
Answers: 1
You know the right answer?
Write a perl script that processes the output of the echo $path shell command. this command displays...
Questions
question
Mathematics, 13.07.2019 03:30
question
Mathematics, 13.07.2019 03:30
Questions on the website: 13722367