Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
replace string with variable
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Lars Haugseth, post: 4818122"] * [email]axel@white-eagle.invalid.uk[/email] wrote: | | | > I dont know how I can replace the zeros on the right of the decimal | > separator, for example I have a file with some lines of data how this | > example: | > | > 20.1300,20.2500,19.7700,20.2500,985365,0 | > | > And I want that the final text appear how this | > | > 20.13,20.25,19.77,20.25,985365,0 | | $str =~ s/0+,/,/g; This will not work if the data contains integers with 0 as the last digit. It will also fail to process the last number on each line. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
replace string with variable
Top