...and here's a non-regex solution:
while ( <DATA> ) { my $comp = (split /-/)[-1]; print $comp; } __DATA__ domainA-comp1 domainB-comp2 domainC-comp3
dave
In reply to Re: Regex with variables?
by Not_a_Number
in thread Regex with variables?
by Quadzilla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |