How can you convert the following matches to the given result?
My files have the following matches
-- cut --
Lorem ipsun Hello lorem ipsun { $hello }
@param integer $question_id // example of the match
Lorem ipsun Hello lorem ipsun { $hello }
-- cut --
I would like to change them efficiently to
@param $question_id integer
My attempt in pseudo-code
perl -i.bak -pe `s/(@param) (\\w) ($\\w)/$1 $3 $2/`