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, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
You know the right answer?
Write a perl script that processes the output of the echo $path shell command. this command displays...
Questions
question
English, 26.05.2021 01:00
question
History, 26.05.2021 01:00
question
Mathematics, 26.05.2021 01:00
question
Mathematics, 26.05.2021 01:00
question
Mathematics, 26.05.2021 01:00
question
Biology, 26.05.2021 01:00
Questions on the website: 13722362