$currentline = ; if($currentline =~ /ENCRYPTED/) { #here i like to point to previous line #so that if i callagain it returns the same line. #without using FileHandle #write(*AFILE); } else { parse($currentLine); }