![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search a pattern and if pattern found insert new pattern at the begining | pitagi | Shell Programming and Scripting | 7 | 02-12-2009 10:27 PM |
| modify a particular pattern starting from second line of the search pattern | imas | UNIX for Dummies Questions & Answers | 1 | 10-12-2008 02:19 PM |
| modify a particular pattern starting from second line of the search pattern | imas | UNIX for Dummies Questions & Answers | 2 | 10-12-2008 12:30 PM |
| SED Search Pattern and Replace with the Pattern | racbern | Shell Programming and Scripting | 4 | 03-15-2008 05:59 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 03:41 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Search pattern not terminated
Hi,
What am i missing on line 16, when I run this I get Search pattern not terminated at count-scr.pl line 16 Code:
#!perl open(my $log, ">log-subnet.txt") or die "Could not open log: $!\n"; ##### Step 1, read subnetsopen(my $in, "<names.txt") or die "Could not open names.txt: $!\n";while(<$in>) { next unless /(.*?)\/(.*)$/; my $subnet = $1; print "Checking $subnet\n"; my @dnsoptions = `./object.exe -u Xxx-p Xxx -b $subnet -o rich`; my %counts; foreach my $line (@dnsoptions) { my @f = split/"\s+", $line; $counts{$f[3]}++; } print $log "For subnet $subnet:\n"; foreach my $k (keys %counts) { print $log " $k: $counts{$k}\n"; }} close($log);
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|