what i need is to get is accessed page and max of date ie jxbx__XYZ01 2007/10/10 as per below example. Do I need to store this o/p in afile and extract from it or can i manipulate the data and get the desired o/p output of the command executed using system jxbx__XYZ0099 2007/02/01 jxbx_XYZ098 2007/08/20 jxbx__XYZ01 2007/10/10 jxbx_XYZ0011 2007/08/05 jxbx_XYZ 2007/09/11 my $file = "pp.txt" ; open (FH ,$file) || die ("could not openfile"); while ) { $usr = system ("listusr | grep $_ | cut -d ' ' -f1,3");