Help for this page

Select Code to Download


  1. or download this
    D:\PerlMonks>digits1.pl
    syntax error at D:\PerlMonks\digits1.pl line 5, near "chomp"
    ...
    Execution of D:\PerlMonks\digits1.pl aborted due to compilation errors
    +.
    
    D:\PerlMonks>
    
  2. or download this
    use strict;
    use warnings;
    ...
    chomp(my $inp = <>);
    $inp =~ s/(\d{4})(\d{4})(\d{4})(\d{4})/$1 $2 $3 $4/;
    print $inp,"\n";