in reply to Re^2: extract the value before a particualr string
in thread extract the value before a particualr string
$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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: extract the value before a particualr string
by Anonymous Monk on Sep 05, 2013 at 11:40 UTC | |
by hdb (Monsignor) on Sep 05, 2013 at 11:49 UTC |