in reply to Re: Removing Commas and Period in Amount Field
in thread Removing Commas and Period in Amount Field

Great that worked. Here's another question. How can I pad a variable with zeros going from right to left? I used chomp on the sub string but it removes the values. Anyone have any ideas?
my $checknum = "0000000" . substr($source, 18, 12);
Thanks, Dave

Replies are listed 'Best First'.
Re^3: Removing Commas and Period in Amount Field
by repellent (Priest) on Feb 10, 2009 at 22:43 UTC
    Maybe this is what you're looking for:
    # left-pad with zeros, total length of 21 my $checknum = sprintf("%021d", $source);

    See sprintf.