RnC has asked for the wisdom of the Perl Monks concerning the following question:
--EOF--#!/usr/bin/perl + $fname = $ARGV[0]; open(FHANDLE, $fname) or die("Error opening file.\n");<br> while(<FHANDLE>) { $_ =~ s/\$([A-Z]+)/\$$1/g; print $_; } close(FHANDLE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printing enviroment vars from regex
by davorg (Chancellor) on Aug 01, 2004 at 19:24 UTC | |
|
Re: printing enviroment vars from regex
by Limbic~Region (Chancellor) on Aug 01, 2004 at 19:30 UTC | |
by BUU (Prior) on Aug 01, 2004 at 19:43 UTC | |
by Limbic~Region (Chancellor) on Aug 01, 2004 at 19:46 UTC | |
by Aristotle (Chancellor) on Aug 01, 2004 at 19:54 UTC | |
by Limbic~Region (Chancellor) on Aug 01, 2004 at 20:02 UTC | |
| |
|
Re: printing enviroment vars from regex
by Aristotle (Chancellor) on Aug 01, 2004 at 19:56 UTC | |
|
Re: printing enviroment vars from regex
by CountZero (Bishop) on Aug 01, 2004 at 19:55 UTC | |
by RnC (Sexton) on Aug 03, 2004 at 15:15 UTC |