in reply to variable declaration shortcut question

I think you want
(my $maid = $fields[0]) =~ /(^\d*)/;

Dave.