fork download
  1. #!/usr/bin/perl
  2. # your code goes here
  3. my $string = "1937.89 1*11.1 1938.03 2*2222.22 0*000.00 3*33333.333 1938.06 ";
  4.  
  5. $string =~ s/\s(\d+)\*(\d+\.\d+)\s/$2"\ $2"x$1/g
  6.  
  7. print $string;
  8.  
Runtime error #stdin #stdout #stderr 0s 6000KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
syntax error at prog.pl line 7, near "print"
Execution of prog.pl aborted due to compilation errors.