TOO SLOW: `echo ${LINE} | sed -n 's/^.* proto //p' | cut -f1 -d" "`
while (<INPUTFILE>) {
@pname = $_ =~ /proto\s+(\w+)/;
print "I found a protocol named: $pname[0]\n";
}
This works if you've correctly specified your file handles. That,
along with any customizations that you may consider asking about next,
are intentionally left blank as an opportunity for self-study.
|