Re: "Convert" perl command line to simple script



On Jun 28, 12:28 pm, "Jürgen Exner" <jurge...@xxxxxxxxxxx> wrote:

-i[*extension*]
specifies that files processed by the "<>" construct are to be
edited in-place. It does this by renaming the input file, opening
the output file by the original name, and selecting that output
file as the default for print() statements. [...]

Seems this is one you will have to code yourself.


Not really.
$ perldoc -q -i
Found in /opt2/Perl5_8_4/lib/perl5/5.8.4/pod/perlfaq5.pod
How can I use Perl's "-i" option from within a program?

Paul Lalli


.



Relevant Pages

  • Re: Help is needed to compile C program using Visual Studie 2005
    ... the pdb file that was used when this precompiled header was created, ... an output file whose name has the following format: ... The length of input file paths and name must be less than 256; ... while(i < DefinedVariableArrayIndex) { ...
    (microsoft.public.vc.language)
  • Re: Need advice on File I/O
    ... open the input file and open an output file, ... you would still have the input file unchanged. ... On all currently supported operating systems, ...
    (comp.soft-sys.matlab)
  • Re: Help with pattern matching
    ... then print the line to an output file. ... > replica of the input file. ... In Perl, CamelBack is generall reserved for package names. ... where their meaning must be expressed in comments. ...
    (perl.beginners)
  • Re: Help with pattern matching
    ... then print the line to an output file. ... > replica of the input file. ... If you had had warnings enabled as well as strict you might have found ... > # Assign the second field to an evaluation scalar ...
    (perl.beginners)
  • Re: Difficult text file to parse.
    ... > records are which there are only two, look at the output file below to ... I want to show the delimiters even if ... > My sample Input file: ... [sample input and output files with long fields snipped] ...
    (comp.lang.perl.misc)