#HERE IS THE SPLIT PROBLEM AREA! $tparse=split(/-/,$current); $writer=$tparse['2'];