in reply to inplace editing code in script
Use B::Deparse to turn a one-liner to a Perl script:
Q:\>perl -MO=Deparse -pi -e "$_='Hello'" BEGIN { $^I = ""; } LINE: while (defined($_ = <ARGV>)) { $_ = 'Hello'; } continue { print $_; } -e syntax OK
See perlvar for the variables used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: inplace editing code in script
by imran77 (Initiate) on Oct 17, 2008 at 04:38 UTC | |
by Corion (Patriarch) on Oct 17, 2008 at 05:58 UTC |