# Exactly equivalent drop-in replacement sub get_my_params { map { defined param( $_ ) ? param( $_ ) : '' } qw( ticket title client next_step o_date o_time ); } #### # Returns a hash, not an array sub get_my_params { map { $_ => defined param( $_ ) ? param( $_ ) : '' } qw( ticket title client next_step o_date o_time ); } # Use this one as so: my %params = get_my_params(); if ( $params{ title } ne '' ) { # Do stuff here. }