1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesya [120]
3 years ago
10

Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does

it match if your input string is Fred, frederick, or Alfred? Make a small text file with a few lines mentioning "fred flintstone" and his friends, then use that file as input to this program and the ones later in this section.
Computers and Technology
1 answer:
Vitek1552 [10]3 years ago
8 0

Answer:

See Explaination

Explanation:

This assume that input is a file and is given on command line. Please note this will ot print lines with frederick as thats what I feel question is asking for

#!/usr/bin/perl -w

open(FILE, $ARGV[0]) or die("Could not open the file $ARGV[0]");

while ($line = <FILE>){

if($line=~/\s+fred\s+/)

{

print $line;

}

}

close(FILE);

You might be interested in
You have created a new dhcp scope with address range 192.168.1.1 to 192.168.1.254. you have five servers configured with static
galben [10]
Reduce the scope to <span>192.168.1.1 .. 192.168.1.239, to avoid conflicting IP's.</span>
6 0
3 years ago
The simplest method to copy information is to first select the information you want to copy, and then use the Copy button and th
777dan777 [17]

Answer:

Home Tab

Explanation:

The copy and paste menu are in the clipboard group.

The clipboard group is on the far left of the Home Tab. It is often used in conjunction with the Editing group, which is on the far right of that tab.

To open the Clipboard task pane, click Home, and then click the Clipboard dialog box launcher.

6 0
3 years ago
What is the purpose of lookup tables in spreadsheet software
garik1379 [7]

You can easily find and changed the data by using lookup table. You can also find the data within few seconds.

7 0
3 years ago
Read 2 more answers
Charlie does not think he will be able to finish his project by the deadline at this point in the decision making progress to so
NemiM [27]
A and B are out because Charlie knows his problem is he is not going to finish in time. D is out because he hasn't talked to his manager yet. so only choice left is C. decide if he should talk to his manager about the problem he now knows
5 0
3 years ago
How Java provides protection through stack inspection approach ?
Natalija [7]
Pecting Java<span> 2's </span>stack inspection<span> policy to be enforced can-. not execute on .... Figure 2. PSLang security policy that </span>allows<span> at most 10 open windows. .... </span>Method<span> call/return: A → B. At start of B, look up</span>protection<span> domain PB for B's. code and push PB on the thread-local domain-. </span>Stack<span>. At return from B (either normally or by.</span>
3 0
3 years ago
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • This program has some errors in it that are needed to be checked import java.io.*;
    13·1 answer
  • Where is line-of-sight Internet common?<br> In space<br> Outdoors<br> Inside<br> In businesses
    10·1 answer
  • A two-dimensional array can be viewed as ___________ and _____________.
    10·1 answer
  • When troubleshooting a desktop motherboard, you discover the network port no longer works. What is the best and least expensive
    12·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • 2. (8 points) When creating the Academic Database, there were several instances of data
    11·1 answer
  • The process known as "bitmapping" is defined as information in _____. PLEASE HELP FAST
    11·1 answer
  • When locating and correcting accessibility issues for a document, you would click what first?
    11·1 answer
  • Which version of java should i use?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!