I need to translate SAS into Perl. So I have a script that slurps the entire SAS file into a scalar and goes about global substitutions in the scalar to hammer the C-like SAS into bread-and-butter Perl. But when it came to defining a global substitute to transform
I came up stumped. Okay, I really only have a problem transforming
because I don't see how to extract what's inside each 'X' within the parentheses (there are varying numbers of them).