in reply to Re^2: Passing Regex Pattern in Subroutine
in thread Passing Regex Pattern in Subroutine

I don't understand why you had to use 'map' to pass the regular expression
You could use map inside your sub, if you prefer.
Is it because when you run get_data( map { "^$_" @ids } ), it is like doing get_data( "^john" ) and that is being passed to the subroutine?
Not exactly. The map is like doing:
get_data( '^john' , '^james' );