#!/usr/bin/perl -w @lines = `perldoc -u -f atan2` ; #assigns each line in the perldoc to a $calar variable in th array @lines #next line starts a loop for every field in the @lines array #by default this is assigned to the variable $_ foreach (@lines) { s/\w<([^>]+)>/\U$1/g; # substitutes a regular expression with <( with the line without this print; # prints the loop varailbe #print $_ ; #would do the same }