in reply to replace all numerics to words in a txt file
has several syntax mistakes. First, there is no closing parenthesis for the if conditional. Then, there is no opening curly brace for the code to execute if the conditional returns a true value. And finally, the (\w) argument doesn't make much sense outside of a regex.if(isdigit (\w)
But you probably don't need this conditional anyway, since your substitution on the next line can be modified to match only numbers, with something like this (untested):
s/(\d+)/num2en($1)/ge;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: replace all numerics to words in a txt file
by anonymized user 468275 (Curate) on Sep 22, 2017 at 09:41 UTC |