in reply to Re^4: displaying html file in the browser using perl
in thread displaying html file in the browser using perl
My tip is to never use $1 (and its other numbered siblings) in a subroutine that doesn't also set them up. Always pass them around as parameters and use the parameters in the subroutine only. My example shows that approach.
This is IMO the better approach because it avoids the problem that a subroutine itself might execute another match (maybe for debugging) and then will overwrite the value you wanted to use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: displaying html file in the browser using perl
by tsdesai (Acolyte) on Dec 19, 2016 at 13:53 UTC |