$filename = (undef, undef, $images[$n]->{imagename}) = (File::Spec->splitpath( $_, 0 )); #### (undef, undef, $filename = $images[$n]->{imagename}) = (File::Spec->splitpath( $_, 0 ));