| Start |
|---|
| Execute some Perl code from command line Simple one-liners may be specified as command line arguments to perl using the Due to Windows quoting rules you can't use single-quoted strings but have to use one of these variants: Note that to avoid breaking old code, only syntax available up to Perl 5.8.x can be used with |
| Using double-quoted strings in Windows one-liners Windows uses only double quotes to wrap command line parameters. In order to use double quotes in perl one-liner (i.e. to print a string with an interpolated variable), you have to escape them with backslashes: To improve readability, you may use a |
Print lines matching a pattern (PCRE grep) Case-insensitive: |
Replace a substring with another (PCRE sed) Or in-place: On Windows: |
Print only certain fields CSV example: |
Print lines 5 to 10 |
| Edit file in-place Without a backup copy (not supported on Windows (opens new window)) With a backup copy With a backup copy |
Reading the whole file as a string Note: The |
Upload file into mojolicious File In this example:
To read more about how to run perl use |
Read Article
https://develop.horje.com/learn/1434/reference