for ($some->complicated(@value)->{$to_fetch}) { print; # print it print LOGFILE $_; # and to the logfile substr($_, 0, 1, ""); # remove its first character }