i'm not familiar with Perl so don't be mad if it doesnt work, but sometimes i need something like you are using (but then in another programming language) and then i do "-1"
i geuss you got to do something like:
Code:
while (<$input>){
if ( $_ =~ /V Status/ && $_ !~ /available(\/syncd)?$/ ){
$broken_line = $_ -1;
$all_ok=0;
print "badline: $broken_line";
}
};
I really don't know if that's possible
or the thing that you put in $broken_line is that a word or a number ?