Re: [OT] perl help on number modification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Jan 15 23:04:38 UTC 2010, Bill Davidsen wrote:
> Does that do what you want? I would think that you want "1." to become just "1"
> as well.
>
> In perl: perl -e 'while(<>) { s/[.0]+$//; print "$_\n" }'

Ok Bill, this is unlikely to happen, as I get values from another
application and in case of integer values it outputs with .00
extension.
But for the sake of precision (or if in the future I would go and
catch up this part of code for another reason... more likely to happen
;-) you are right and I changed the regex in my script.

BTW also the second suggestion by Jake worked; it only was with more
typed characters....
Thanks again
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux