in reply to Proper creation of a negative number
use warnings; use strict; while (<DATA>) { chomp; s/(.+)-$/-$1/; print "$_\n"; } __DATA__ 1.05 -5.66 7.89-
Outputs:
1.05 -5.66 -7.89
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Proper creation of a negative number
by Anonymous Monk on Jul 08, 2015 at 17:12 UTC |