open (MAN, "/usr/bin/man ssh |"); while (<MAN>) { s/^\s+//g; push(@ml,$_); } foreach $line (@ml) { $line =~s/\n$//; $line =~s/^\n//; $line =~s/^\s+//; } for ($x=0; $x<=45; $x++) { if ($ml[$x]=~/NAME/) { while($ml[$x] !~/SYNOPSIS/) { $nl .= $ml[$x] } } }
In reply to script debug by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |