Okay, that's a start. What you're doing isn't technically wrong, but it's not very perl-ish. perl has a wonderful pattern matching facility; you may as well take advantage of it. If I'm understanding your problem, you could approach it like this:
if ($line =~ m/Trunk Group: (\w+)/) {
my $match = $1;
#do things with $match
}
I suggest you do a 'perldoc perlre' and read up on regular expressions. I think you'll be pleasantly surprised by what you find there.
| [reply] [d/l] |
Regex is a better solution, but to answer your original question you would use a \t to represent a tab character.
if ((substr($line,1,13)) eq ("\tTrunk Group:"))
| [reply] [d/l] |
The text your are looking for 2W36164K, why not use a simple pattern regex? | [reply] |