I want to be able to do a regex match on a variable and assign the results to the variable itself. What is the best way to do it?
I want to essentially combine lines 2 a
I do this:
#!/usr/bin/perl $target = "n: 123"; my ($target) = $target =~ /n:\s*(\d+)/g; print $target; # the var $target now is "123"