in reply to split problem...
open( FH, ">/some/path/debug.txt" ) or die "can't write debug.txt: $!" +; for my $_line ( split /[\r\n]+/, $itDetail ) { my ( $Num, $Qt, $_trashit ) = split /\^/, $_line; print FH "Num = $Num\n"; # do other things... } [download]