#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; my $record = { col1 => "value8", col2 => "value9", col3 => "value10|value11|value12", col4 => "value13|value14|value15", }; dd( $record ); SomethingUnPipeModifyRecord( $record ); dd( $record ); dd( $record->{col4} ); dd( $record->{col4}[0] ); sub SomethingUnPipeModifyRecord { my( $rec ) = @_; for my $val( values %$rec ){ my $newval = [ split /\|/, $val ]; $val = $newval; } return $rec; } __END__ { col1 => "value8", col2 => "value9", col3 => "value10|value11|value12", col4 => "value13|value14|value15", } { col1 => ["value8"], col2 => ["value9"], col3 => ["value10", "value11", "value12"], col4 => ["value13", "value14", "value15"], } ["value13", "value14", "value15"] "value13"