$1 holds the result of the pattern match captured inside (parenthesis). If you had multiple parens then there would also be a $2, $3, etc. The $/ variable is the input record separator, this defaults to being a newline, so print $_,$/ is equivalent to print "$_\n". The $ after total tells the regex engine that total will be the last thing on the line.
Cheers,
R.
In reply to Re^3: extract the value before a particualr string
by Random_Walk
in thread extract the value before a particualr string
by nanban
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |