perl -wn -- - /etc/passwd <<'EOF' use feature 'say'; next unless / ([^:]*) : [^:]* : ([0-9]+) /x; my ($w, $n) = (uc $1, 5000 + $2); say qq{log=$w id=$n} EOF