in reply to Joining if an array
I'm not sure what you're trying to accomplish with the regex, but you want to use the ternary operator:
$in = ref( $scalar ) eq "ARRAY" ? join( ",", @$scalar ) : $scalar;
Update: Hot dog ... learn something new everyday. I never knew you could use a regex in place of ref.
|
|---|