Tag Archives: Perl

Perl Differences in string handling

A note to Perl users, strings that contain numbers will not be automatically converted to numbers when used in an expression such as when trying to read numbers from a file like the one below does.
DATA.each do |line|
vals = line.split # split line, storing tokens in val
[...]

Posted in Development, Programming Basics | Also tagged | Comments closed