perl_edit
Edit files using Perl one-liners for text manipulation with cross-platform support, enabling targeted modifications without full file replacement.
Instructions
Edit files using Perl one-liners (more powerful than sed, better cross-platform support)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"script": "<script>"
},
"name": "perl_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File to edit | |
| script | Yes | Perl script (e.g., "s/old/new/g" or "$_ = uc" for uppercase) | |
| backup | No | Create backup file | |
| multiline | No | Enable multiline mode (-0777) |