#!/usr/bin/perl use strict use warnings; use File::Slurp; my $content = read_file($ARGV[0]); my $search = $ARGV[1]; foreach my $line(split /\n/, $content){ chomp $line; if($line =~ m/^.*$search.*$/i){ print "$line\n\n\n"; } } unlink $ARGV[0]; print "Bwaahahahahhaha\n";
In reply to Re: Searching for a string
by japh2963
in thread Searching for a string
by sharmav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |