Answer the question
In order to leave comments, you need to log in
How to extract a number/word after a specific character (perl, regular expressions)?
Good afternoon!
At the moment, I have a script that accesses the equipment via telnet, asks for information about the piece of iron, enters it into an array, and then extracts a string from the array containing the sequence of characters "No.:"
@line = $t->cmd(Timeout => 120, String =>'show version');
@result = grep/\s(No.:)/, @line;
print @result;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question