fork(6) download
  1. #!/usr/bin/perl
  2. # your code goes here
  3. $x = "MyFooBar";
  4. $x =~ s/(?:^|(?<=[a-z])(?=[A-Z]))(.)/-lc($1)/eg;
  5. $x = substr($x, 1);
  6. print $x;
Success #stdin #stdout 0s 6000KB
stdin
Standard input is empty
stdout
my-foo-bar