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.
In reply to Re: inplace editing code in script
by Corion
in thread inplace editing code in script
by imran77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |