in reply to Efficient split for alpha numeric pairs in a row

You can use a regular expression. The /g modifier in a while-loop will match as many times as possible:
#! /usr/bin/perl use warnings; use strict; use Data::Dumper; while (<DATA>) { my %hash; while (/([A-Z])([0-9.]+)/g) { my ($key, $num) = ($1, $2); $hash{$key} = $num; } print Dumper(\%hash); } __DATA__ N260G02X142.05Y649.62I77.33J58.34H2M25 N265M20 N270G45 N275G01X304.78Y608.8C45.91M25 N280M20 N285G46C0 N290G03X324.39Y638.4I-69.58J67.4H2M25 N295M20 N300G45 N305G01X180.04Y592.89C326.5M25 N310X279.77Y586.78C26.5 N315X195.39Y584.57C336.5 N320X228.31Y579.58C355.92
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ