in reply to prob keeping my floats floating
split expects a pattern; . is special to a pattern:
C:\Users\Peter>perl -we "print join ':', split('.', '2.3.4')" C:\Users\Peter>perl -we "print join ':', split('\.', '2.3.4')" 2:3:4
addendum: showing number of elements:
C:\Users\Peter>perl -we "print scalar split('.', '2.3.4', -1)" 6 C:\Users\Peter>perl -we "print scalar split('\.', '2.3.4', -1)" 3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: prob keeping my floats floating
by perl-diddler (Chaplain) on Feb 15, 2019 at 02:47 UTC |