D
Duke of Hazard
I can not figure out why this is not printing just 123:
$name = "123\n456\n789";
$name =~ s/\n.*//;
print $name;
which outputs:
123
789
If I write it in php using preg_replace , it works!
$name = "123\n456\n789";
$name =~ s/\n.*//;
print $name;
which outputs:
123
789
If I write it in php using preg_replace , it works!