Syntactic Confectionery Delight | |
PerlMonks |
Re: Removing white space from the fileby Monk::Thomas (Friar) |
on Aug 12, 2015 at 07:59 UTC ( [id://1138281]=note: print w/replies, xml ) | Need Help?? |
You can not apply a substitution to a file handle. (Well you can, but it does not modify the actual file content.) Another problem is:
...which would open the file for appending, but NOT for reading. You did not specify whether you want an in-place edit of the file or whether you just want to convert the content for further processing. (For an in-place edit I would actually prefer to use something like 'sed -i~ s/[0-9 ]//g uuu.txt' instead of perl, because I get a backup copy of the original file for free.)
In Section
Seekers of Perl Wisdom
|
|