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, 22.06.2019 19:30
When using a public computer or network, you should always
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
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
Spanish, 21.10.2019 19:30
question
Mathematics, 21.10.2019 19:30
Questions on the website: 13722359