in reply to Print Current Program Source Code
Another way to do it in Linux:
use strict; use warnings; system("cat $0");
If your on a Windows box, change cat to type, and consider adding quotation marks (for the likely case of a filename with spaces in it):
use strict; use warnings; system("type \"$0\"");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Print Current Program Source Code
by davorg (Chancellor) on Aug 18, 2006 at 10:30 UTC | |
by tinita (Parson) on Aug 18, 2006 at 12:01 UTC | |
|
Re^2: Print Current Program Source Code
by davidrw (Prior) on Aug 18, 2006 at 12:47 UTC |