#!/usr/bin/perl -w my $pattern = ; open (FILE, "< filename"); while () { if (/$username/) { print "$_ \n"; } }