$setstr =~ /(.*)\|\|$/
If you always want to remove two pipes from the end of a line, you could also use the substitute function:
$setstr =~ s/\|\|$//;
Hope this helps
--Foxcub
In reply to Re: [perlre] grouping parenthesis capture whole string instead of proper subset... why?
by Tanalis
in thread [perlre] grouping parenthesis capture whole string instead of proper subset... why?
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |